Re: Found a PHP bug!!!!!!!!!

From: Date: Tue, 28 Jan 2003 15:19:02 +0000
Subject: Re: Found a PHP bug!!!!!!!!!
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-133370@lists.php.net to get a copy of this message
just try doing it with === (three equal signs) and you'll see what is where -- Maxim Maletsky maxim@php.net "Cal Evans" <cal@calevans.com> wrote... : > John. > > > Actually, "08" is equal to 8 in PHP. PHP will convert the string to an > >integer and the two will compare as equal. > > No they are not equal. Yes, PHP will do the conversion so that they are > equal. That does not refute the fact that logically '08' != 8. > > > > Someone already posted why the problem was happening, because the numbers > > were being converted to invalid octal numbers and being set to zero. > > I understand the problem at hand. (and did when I posted) However, if Scott > had been doing the conversions manually, he would never have run across this > problem. It is a bad idea to rely on the language (whatever the language) > to do automatic variable conversions. > > =C= > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#133370) next »