php compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux