note 66511 added to language.control-structures
| From: | abu_hurayrah at hidayahonline dot org | Date: | Wed, 24 May 2006 20:42:23 +0000 |
| Subject: | note 66511 added to language.control-structures | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-111957@lists.php.net to get a copy of this message | ||
Regarding lamfeust's example:
Just a note about initializing variable
<?php
if($foo=false)
print("true");
else
print("false");
// this print on screen false
?>
This will print out "false" due to the expression "$foo=false" returning the
value of the assignment - boolean false, in this case.
I'm not sure what, exactly, that had to do with initialization.
----
Server IP: 64.71.164.2
Probable Submitter: 69.222.238.2
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/language.control-structures.php
Edit -- http://master.php.net/note/edit/66511
Del: integrated -- http://master.php.net/note/delete/66511/integrated
Del: useless -- http://master.php.net/note/delete/66511/useless
Del: bad code -- http://master.php.net/note/delete/66511/bad+code
Del: spam -- http://master.php.net/note/delete/66511/spam
Del: non-english -- http://master.php.net/note/delete/66511/non-english
Del: in docs -- http://master.php.net/note/delete/66511/in+docs
Del: other reasons-- http://master.php.net/note/delete/66511
Reject -- http://master.php.net/note/reject/66511
Search -- http://master.php.net/manage/user-notes.php