NYCPHP Meetup

NYPHP.org

[nycphp-talk] Why do "cool kids" choose PHP to build websites instead of Java

inforequest 1j0lkq002 at sneakemail.com
Wed Jan 16 03:36:44 EST 2008


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! 



More information about the talk mailing list