Re: Incompatability in php4
| From: | Andi Gutmans | Date: | Wed, 08 Sep 1999 20:40:50 +0000 |
| Subject: | Re: Incompatability in php4 | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-4263@lists.php.net to get a copy of this message | ||
I'm commiting a fix to the CVS right now.
Andi
At 02:01 PM 9/8/99 +0100, Nuno Loureiro wrote:
Hi!!--- Andi Gutmans <andi@zend.com> http://www.zend.com/I had this piece of code working very well under php3, but it's notworking 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