Re: [PHP4BETA] Incompatability in php4

From: Date: Wed, 08 Sep 1999 20:44:14 +0000
Subject: Re: [PHP4BETA] Incompatability in php4
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-4267@lists.php.net to get a copy of this message
On 08-Sep-99 Andi Gutmans wrote this and I have to respond: } BTW, the fix I did just makes sure it follows the PHP 3.0 behaviour which } means converting the floating point number to an integer. } You should probably do this yourself in your code so that you know what's } going on. I already did it.. I did a int cast to it. Thank you very much. Best Regards, Nuno Loureiro } At 03:38 PM 9/8/99 +0200, Jakub Skopal wrote: } >Hi, } > } > try to surround the argument of the array subscription } >with IntVal(). } > } > Jakub } > } >08.09.1999 v 14:01:38 (+0100), Nuno Loureiro napsal: } > > Hi!! } > > } > > I had this piece of code working very well under php3, but it's not } > > working anymore under php4. } > > } > > ------------------------------------------------------ } > > for($i=48;$i<=57;$i++) } > > $digitos[]=$i; } > > for($i=65;$i<=90;$i++) } > > $letras[]=$i; } > > for($i=97;$i<=122;$i++) } > > $letras[]=$i; } > > } > > for ($i=0;$i<4;$i++) { } > > srand((double)microtime()*1000000); } > > $randval[] = chr($letras[(rand()/getrandmax())*count($letras)]); } > > } } > > for ($i=0;$i<2;$i++) { } > > srand((double)microtime()*1000000); } > > $randval[] = chr($digitos[(rand()/getrandmax())*count($digitos)]); } > > } } > > ------------------------------------------------------- } > > } > > It gave me this error (lines 282 and 286 are both randval lines in the } > > code): } > > } > > Warning: Illegal offset type in include/functions.php3 on line 282 } > > } > > Warning: Illegal offset type in include/functions.php3 on line 282 } > > } > > Warning: Illegal offset type in include/functions.php3 on line 282 } > > } > > Warning: Illegal offset type in include/functions.php3 on line 282 } > > } > > Warning: Illegal offset type in include/functions.php3 on line 286 } > > } > > Warning: Illegal offset type in include/functions.php3 on line 286 } > > } > > } > > Do you have any ideas why?! } > > } > > Best regards, } > > } > > Nuno Loureiro } > > } > > ------------- } > > Nuno Loureiro <nuno@eth.pt> } > > Ethernet, Solucoes Informaticas, LDA. } > > http://www.eth.pt } > > } > > -- } > > PHP 4 Beta } > } >-- } > } > Jakub "RiffRaff" Skopal } > mailto:j@kubs.cz } } --- } Andi Gutmans <andi@zend.com> } http://www.zend.com/ } } -- } PHP 4 Beta ------------- Nuno Loureiro <nuno@eth.pt> Ethernet, Solucoes Informaticas, LDA. http://www.eth.pt => Visite o nosso servico gratuito de leiloes online em http://almoeda.eth.pt

« previous php.version4 (#4267) next »