Re: Minor engine patch to facilitate PECL/operator
| From: | Jakub Vrana | Date: | Fri, 17 Feb 2006 12:59:56 +0000 |
| Subject: | Re: Minor engine patch to facilitate PECL/operator | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-21901@lists.php.net to get a copy of this message | ||
Sara Golemon wrote:
> Yes, and that's the problem. $a > $b *isn't* read by the current parser as
> $a > $b, it's read as $b < $a.
> For all normal PHP comparisons, the distinction is unimportant... 4 < 2
> and 2 > 4 will both evaluate to false after all.
Array comparison is due this logic also strange:
$a = array(0, 1);
$b = array(1 => 0, 0 => 1);
var_dump($a < $b); // true
var_dump($a > $b); // true
$a is both less than and greater than $b.
Jakub Vrana