Boolean type forced on string assignment inside if statement

From: Date: Wed, 02 Jan 2013 15:53:39 +0000
Subject: Boolean type forced on string assignment inside if statement
Groups: php.general 
Request: Send a blank email to php-general+get-319993@lists.php.net to get a copy of this message
Hi folks, if ($a = "foo" && $b = "bar"){ echo $a."<br />".$b; } Returns: 1 bar I expect: foo bar Is this documented? Marc

« previous php.general (#319993) next »