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 %
Why PHP should never be taught, Part II.
-
Four years of consumption offsets and going strong.
In 2010, I decided to start matching everything I spend on a non-essential purchase with an equal donation to an effective charity. It's worked for…
-
Aaron Swartz.
I went to the memorial service for Aaron at the Internet Archive last night. This is what I said. I've been thinking about Aaron every day…
-
My Google+ profile has just been suspended for having an unusual name.
If you would like to help me get it unsuspended, please post a note here to help provide evidence that "Ping" is the "name [my] friends, family or…
-
Four years of consumption offsets and going strong.
In 2010, I decided to start matching everything I spend on a non-essential purchase with an equal donation to an effective charity. It's worked for…
-
Aaron Swartz.
I went to the memorial service for Aaron at the Internet Archive last night. This is what I said. I've been thinking about Aaron every day…
-
My Google+ profile has just been suspended for having an unusual name.
If you would like to help me get it unsuspended, please post a note here to help provide evidence that "Ping" is the "name [my] friends, family or…
← Ctrl ← Alt
Ctrl → Alt →
← Ctrl ← Alt
Ctrl → Alt →