From 84c2ee3c4e7772e58b73af14d5fd714fa142c3b3 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 7 Jan 2009 13:10:41 +0000 Subject: [PATCH] Document short ?: git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@272952 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/operators.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/language/operators.xml b/language/operators.xml index 932f80dd4d..901bee09ea 100644 --- a/language/operators.xml +++ b/language/operators.xml @@ -1,5 +1,5 @@ - + Operators @@ -694,6 +694,12 @@ if (empty($_POST['action'])) { expr3 if expr1 evaluates to &false;. + + Since PHP 5.3, it is possible to leave out the middle part of the ternary + operator. Expression expr1 ?: expr3 returns + expr1 if expr1 + evaluates to &true;, and expr3 otherwise. + Please note that the ternary operator is a statement, and that it