Re: [PHP-DEV] Bug #3922 Updated: == bug From: Zeev Suraski (zeev <email protected>)
Date: 05/20/00

On 20 May 2000, Bug Database wrote:

> ID: 3922
> Updated by: hholzgra
> Reported By: fuf <email protected>
> 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 <email protected>>
http://www.zend.com/

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>