php-general | 2001032
Date: 03/31/01
- Next message: Jack Dempsey: "Re: [PHP] problem loading extension"
- Previous message: Christian Dechery: "[PHP] problem loading extension"
- Next in thread: Yasuo Ohgaki: "Re: [PHP] [Fwd: php...]"
- Reply: Yasuo Ohgaki: "Re: [PHP] [Fwd: php...]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
--
$_ = '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$/),$/);
attached mail follows:
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: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jack Dempsey: "Re: [PHP] problem loading extension"
- Previous message: Christian Dechery: "[PHP] problem loading extension"
- Next in thread: Yasuo Ohgaki: "Re: [PHP] [Fwd: php...]"
- Reply: Yasuo Ohgaki: "Re: [PHP] [Fwd: php...]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

