php compiler

From: Date: Sat, 30 Oct 2004 13:49:51 +0000
Subject: php compiler
Groups: php.general 
Request: Send a blank email to php-general+get-200711@lists.php.net to get a copy of this message
Hi! $a = 0; $b = 1; if ($a = 1 && $b = 0) { echo 'true '; var_dump($a); var_dump($b); } else { echo 'false '; var_dump($a); var_dump($b); } Runing this we get: "true bool(false) int(0)" After the precedence table the first step could be evaluating the &&, but not this is what happen. Can someone exactly explain how PHP process the condition? THX in advance, Felho

« previous php.general (#200711) next »