Bug #10287: php parser error

From: Date: Wed, 11 Apr 2001 12:25:06 +0000
Subject: Bug #10287: php parser error
Groups: php.dev 
Request: Send a blank email to php-dev+get-51441@lists.php.net to get a copy of this message
From: robert.samanek@post.cz Operating system: win nt + linux (debian) PHP version: 4.0.4pl1 PHP Bug Type: Scripting Engine problem Bug description: php parser error hi, i'm afraid i found (by chance :-) ) a parser error. look at this code: <? $ar1=array (1,2,3); $ar2=array (4,5,6); if(list($ar1_val)=each($ar1)&&list($ar2_val)=each($ar2)) echo "Ok"; else echo "Error"; ?> php simply hangs by parsing that (i tried it on both win and linux - last release, 4.0.4pl1). the cure is to add more parenthesis, like this: if((list($ar1_val)=each($ar1))&&(list($ar2_val)=each($ar2))) but anyway, php should not hang in the first case... bye -- Edit Bug report at: http://bugs.php.net/?id=10287&edit=1

« previous php.dev (#51441) next »