[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: and Lua marches on
- From: Eike Decker <zet23t@...>
- Date: Tue, 15 Dec 2009 13:28:03 +0100
> Hah. I would just take it as a compliment, even though PHP obviously has its
> shortcomings (in abundance). They probably just meant that Lua is friendly
> and easy to use. :-)
Shortcoming? PHP IS a shortcoming. I should know, I am working with it
regularly and there are a lot of weird behaviors. I mean, take this:
$a = 1;
$b = 0;
$c = $a and $b;
$d = $a && $b;
echo "'$c' != '$d' \n";
Outcome:
'1' != ''
The 'and' operator is different from the '&&' one - it has a !lower!
precedence than the "=" operator (for whatever reasons) resulting in
such things!