[nycphp-talk] Why do "cool kids" choose PHP to build websites instead of Java
Daniel Convissor
danielc at analysisandsolutions.com
Tue Jan 15 10:20:18 EST 2008
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.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
More information about the talk
mailing list