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

From: Date: Mon, 27 Jan 2003 21:33:27 +0000
Subject: Re: Found a PHP bug!!!!!!!!!
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-133300@lists.php.net to get a copy of this message
Aw nut!!! The intval() doesn't work...... I had enough, I'm going to do what Kirk Johnson recommend. That one work better..... "Scott Fletcher" <scott@abcoa.com> wrote in message news:20030127210418.64057.qmail@pb1.pair.com... > Yea, it's too bad that not many people know about it. I first asked and > they told me it is done automatically. That was 3 years ago. I never had a > problem for 3 years until now. So, I'm going back to the old way as I did > in Javascript and C programming. I first started PHP 3 years ago, so it's > no wonder why there's all the confusion when I was just an innocent victim. > :-) > > "Cal Evans" <cal@calevans.com> wrote in message > news:FLEGKEMHDIDDEJOGHHNFKEOFJLAA.cal@calevans.com... > > 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= > > > >

« previous php.general (#133300) next »