At 17:59 9/2/2001, [EMAIL PROTECTED] wrote: >ID: 9186 >User Update by: [EMAIL PROTECTED] >Status: Bogus >Bug Type: Scripting Engine problem >Description: string compare with "==" does not work correctly > >I think there is no reason to convert any type if both >operands of the comparision are of the same type. It costs >time and it's completely not necessary. This is a bug. No, it's not a bug. It's definitely an intended behavior. PHP does it's best to do the 'right thing' in the most common cases. Because of the way it works, effectively, comparing strings that 'look like numbers' as if they were numbers makes life much, much easier. If you want to enforce a string comparison, use strcmp(). Zeev -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
- [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare wit... zak
- [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compar... tom . anheyer
- Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: strin... Zak Greant
- Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: s... Alan van den Bosch
- Re: [PHP-DEV] PHP 4.0 Bug #9186 Update... Zak Greant
- Re: [PHP-DEV] PHP 4.0 Bug #9186 Update... Hartmut Holzgraefe
- Re: [PHP-DEV] PHP 4.0 Bug #9186 U... Zeev Suraski
- Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: strin... Zeev Suraski
- Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: s... Zak Greant
- Re: [PHP-DEV] PHP 4.0 Bug #9186 Update... Zeev Suraski
- Re: [PHP-DEV] PHP 4.0 Bug #9186 U... Zak Greant
- Re: [PHP-DEV] PHP 4.0 Bug #91... Alan van den Bosch
- Re: [PHP-DEV] PHP 4.0 Bug #91... Telemann, Bo
- [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compar... zak
- [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compar... sniper
- [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compar... zeev
- [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compar... zeev
- [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compar... tom . anheyer