svn: /phpdoc/en/trunk/language/ operators.xml

From: Date: Thu, 13 Mar 2014 00:22:52 +0000
Subject: svn: /phpdoc/en/trunk/language/ operators.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-12213@lists.php.net to get a copy of this message
philip Thu, 13 Mar 2014 00:22:52 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=332978 Log: Ternary is an expression, not a statement. Patch by Alok Menghrajani. Changed paths: U phpdoc/en/trunk/language/operators.xml Modified: phpdoc/en/trunk/language/operators.xml =================================================================== --- phpdoc/en/trunk/language/operators.xml 2014-03-12 23:25:43 UTC (rev 332977) +++ phpdoc/en/trunk/language/operators.xml 2014-03-13 00:22:52 UTC (rev 332978) @@ -1455,8 +1455,8 @@ </para> <note> <simpara> - Please note that the ternary operator is a statement, and that it - doesn't evaluate to a variable, but to the result of a statement. This + Please note that the ternary operator is an expression, and that it + doesn't evaluate to a variable, but to the result of an expression. This is important to know if you want to return a variable by reference. The statement <literal>return $var == 42 ? $a : $b;</literal> in a return-by-reference function will therefore not work and a warning is

« previous php.doc.cvs (#12213) next »