| Ping ( @ 2007-12-11 18:32:00 |
Why PHP should never be taught, Part II.
This is a follow-up to Why PHP should never be taught.
This is a follow-up to Why PHP should never be taught.
Aaaarghhh!!! It's so arbitrary.% cat comparison.php <?php $a = -1; $b = 0; $c = 1; $d = True; print "d > $a: "; print ($d > $a) ? "yes\n" : "no\n"; print "d > $b: "; print ($d > $b) ? "yes\n" : "no\n"; print "d > $c: "; print ($d > $c) ? "yes\n" : "no\n"; print "\n"; print "d < $a: "; print ($d < $a) ? "yes\n" : "no\n"; print "d < $b: "; print ($d < $b) ? "yes\n" : "no\n"; print "d < $c: "; print ($d < $c) ? "yes\n" : "no\n"; print "\n"; print "e > $a: "; print ($e > $a) ? "yes\n" : "no\n"; print "e > $b: "; print ($e > $b) ? "yes\n" : "no\n"; print "e > $c: "; print ($e > $c) ? "yes\n" : "no\n"; print "\n"; print "e < $a: "; print ($e < $a) ? "yes\n" : "no\n"; print "e < $b: "; print ($e < $b) ? "yes\n" : "no\n"; print "e < $c: "; print ($e < $c) ? "yes\n" : "no\n"; ?> % php comparison.php d > -1: no d > 0: yes d > 1: no d < -1: no d < 0: no d < 1: no e > -1: no e > 0: no e > 1: no e < -1: yes e < 0: no e < 1: yes %