Re: Bug #3922 Updated: == bug

From: Date: Sat, 20 May 2000 07:48:23 +0000
Subject: Re: Bug #3922 Updated: == bug
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-18998@lists.php.net to get a copy of this message
On 20 May 2000, Bug Database wrote: > ID: 3922 > Updated by: hholzgra > Reported By: fuf@fuf.sh.cvut.cz > Status: Closed > Bug Type: Misbehaving function > Assigned To: > Comments: > > > it's not a bug, it's a feature :( (same in php4) > > you compare an integer to a string, > the string is converted to an integer > and as 'N/A' does not contain any digits > its integer value is 0, so they are > equal > the other way round it wouldn't: > > 0 == 'N/A' -> true > 'N/A' == 0 -> false What do you mean by that? There's no difference between (0=='N/A') and ('N/A'==0) in both PHP 3.0 and 4.0 - both of the lvalue and rvalue behave in the same way. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/

« previous php.dev (#18998) next »