|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-05-13 17:48 UTC] manuzhai@php.net
[2002-05-13 17:56 UTC] sitnikov at infonet dot ee
[2002-05-13 18:20 UTC] manuzhai@php.net
[2002-05-13 18:30 UTC] sitnikov at infonet dot ee
[2002-05-14 13:46 UTC] phpclub at digiways dot com
[2002-05-16 13:27 UTC] derick@php.net
[2003-01-18 16:14 UTC] philip@php.net
[2003-01-20 12:06 UTC] m dot ford at lmu dot ac dot uk
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 07:00:01 2025 UTC |
Why & How this code will work? <? function foo($flag) { return $flag; } $a=TRUE; echo "if (!\$a = foo(FALSE))) is "; if (!$a = foo(FALSE)) echo "true"; else echo "false"; echo "\n"; var_dump($a); echo "\n"; ?> Output: if (!$a = foo(FALSE))) is true bool(false) http://www.php.net/manual/en/language.operators.php "Operator Precedence" `!` has more precedence than `=` And after `!` we must have boolean constant in left side: FALSE = foo() Explain to me pls that I do not understand P.S. in C & Perl (!$a = foo()) is not valid expression