Document short ?:

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@272952 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2009-01-07 13:10:41 +00:00
parent e640d48fe9
commit 84c2ee3c4e

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.128 $ -->
<!-- $Revision: 1.129 $ -->
<chapter xml:id="language.operators" xmlns="http://docbook.org/ns/docbook">
<title>Operators</title>
<simpara>
@ -694,6 +694,12 @@ if (empty($_POST['action'])) {
<replaceable>expr3</replaceable> if
<replaceable>expr1</replaceable> evaluates to &false;.
</para>
<para>
Since PHP 5.3, it is possible to leave out the middle part of the ternary
operator. Expression <literal>expr1 ?: expr3</literal> returns
<replaceable>expr1</replaceable> if <replaceable>expr1</replaceable>
evaluates to &true;, and <replaceable>expr3</replaceable> otherwise.
</para>
<note>
<simpara>
Please note that the ternary operator is a statement, and that it