note 82956 deleted from language.oop5.overloading by colder
| From: | colder@php.net | Date: | Sat, 03 May 2008 16:09:34 +0000 |
| Subject: | note 82956 deleted from language.oop5.overloading by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-139026@lists.php.net to get a copy of this message | ||
Note Submitter: egingell at sisna dot com
----
@Hayley Watson
$a = $b = $c is not the same as $a = ($b = $c). In the second example, $a will be boolean true or
false depending on whether $c has a value that is considered to be a loose true or false.
<?
$c = 1;
$a = ($b = $c); // $a === true
$c = 0;
$a = ($b = $c); // $a === false
$c = "blah";
$a = ($b = $c); // $a === true
$c = "";
$a = ($b = $c); // $a === false
?>