Daniel Convissor danielc-at-analysisandsolutions.com |nyphp dev/internal
group use| wrote:
Hey John:
On Mon, Jan 14, 2008 at 11:22:44AM -0500, John Campbell wrote:
If you still don't understand the problem, then take this quiz:
what is the output of the following statements?
var_dump(true + true);
var_dump(null < 0);
var_dump(null < -1);
var_dump(null < 1);
The third one tripped me up. It's TRUE. I expected it to be false under
the assumption that null == 0 in most PHP contexts. But it seems like
it's really nothing/null in this context.
Since null is nothing and a
negative number is something, it makes some sort of sense.
^^^^^^^^^^^^^^^ gotta love that commitment to PHP!
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php