Incompatability in php4
| From: | Nuno Loureiro | Date: | Wed, 08 Sep 1999 13:01:38 +0000 |
| Subject: | Incompatability in php4 | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-4237@lists.php.net to get a copy of this message | ||
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