Re: php compiler

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

 



Hodicska Gergely wrote:
$a = 1 && $b = 0
PHP sees two expressions here:
After the precedence table the first thing should be evaluating 1 && $b, so we get:
$a = false = 0
Which is not meaningful thing, and maybe this cause that the evaluating of the statment is not in the right order.

"=" has a "right " associativity. This is well explained on the page you think I have not read. See Example 15-1. "$b = 0" is evaluated first and the "1 && $b" is evaluated after that.


Everything else would make no sense. "(1 && $b) = 0" is not a valid expression and throws an error.

--
Bye, K <http://www.ailis.de/~k/> (FidoNet: 2:240/2188.18)
[A735 47EC D87B 1F15 C1E9  53D3 AA03 6173 A723 E391]
(Finger k@xxxxxxxx to get public key)

Attachment: signature.asc
Description: OpenPGP digital signature


[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