Re: Stop Breaking Our Apps For the Sake of OO

From: Date: Thu, 11 May 2006 21:09:05 +0000
Subject: Re: Stop Breaking Our Apps For the Sake of OO
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Thu, May 11, 2006 2:30 pm, Jasper Bryant-Greene wrote:
> Jared Williams wrote:
>>
>> Interesting logic break too...
>>
>> $foo = new stdClass();
>> if ($foo == null || $foo != null) { echo 'Never gets echoed'; }
>
> From a pure computer science point of view, the above makes complete
> sense. Null means unknown value, so nothing is equal to it, not even
> another null (because you don't know if the other null's *unknown*
> value
> is equal to this null's *unknown* value). is_null() would make more
> sense here.

With all due respect to the Mathematical theory behind that, it's just
asinine in a programming language I have to use every day.

Sorry.

:-)

-- 
Like Music?
http://l-i-e.com/artists.htm


Thread (33 messages)

« previous php.internals (#23279) next »