-- 
$_ = 'George Schlossnagle';
s#.#(ord$')-(ord$&)+((index($_,$')-$&)?1002:0)#ego;s#-#((substr($],4,1)-6)?67:$-[0])#eog;$:=$_;print
join('',(map chr$_,reverse
map{substr($:,(3*$_),3)+(11,-109,-14,94,-894,-28,-61,-202,-417,83,-20,-678,53,96,4,-494,82,-869,-826,24,16,-684,-450,-27)[$_]}(0...length($_)/3)),chr(length($_)/2+ord$/),$/);


I'm sure you appreciate the importance of transitive equality in programming
languages (especially they all aspire to be pseudo-mathematical), which is
why I think you'll appreciate this.

<?php

$a = "0";
$b = 0;
$c = "";
$d = "       ";

$a == $b  // T
$b == $c  // T
$a == $c  // F!!

$b == $c  // T
$b == $d  // T
$c == $d  // F!!

?>

Perl, of course, outputs the expected values: $a, $b, $c and $d are equal
under '==', and only $a and $b are equal under 'eq'. PHP's '===' operator
(its equivalent to 'eq') says that $a, $b, $c and $d are all different.

Doesn't that seem like a fundamental flaw? How can equality NOT be
transitive?? How can anyone be expected to write programs in such an
environment?

D





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to