philip Sat Jan 18 17:13:35 2003 EDT Modified files: /phpdoc/en/language operators.xml Log: Document that if (!$a = foo()) works despite the operator precedence. This closes bug #17180 Index: phpdoc/en/language/operators.xml diff -u phpdoc/en/language/operators.xml:1.40 phpdoc/en/language/operators.xml:1.41 --- phpdoc/en/language/operators.xml:1.40 Wed Oct 9 04:30:45 2002 +++ phpdoc/en/language/operators.xml Sat Jan 18 17:13:35 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.40 $ --> +<!-- $Revision: 1.41 $ --> <chapter id="language.operators"> <title>Operators</title> <simpara> @@ -116,6 +116,15 @@ </tgroup> </table> </para> + <note> + <para> + Although <literal>!</literal> has a higher precedence than + <literal>=</literal>, PHP will still allow expressions + similar to the following: <literal>if (!$a = foo())</literal>, + in which case the output from <literal>foo()</literal> is + put into <variable>$a</variable>. + </para> + </note> </sect1> <sect1 id="language.operators.arithmetic">
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php