mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Document short ?:
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@272952 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e640d48fe9
commit
84c2ee3c4e
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue