php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2246 for(;;) no longer works right
Submitted: 1999-09-06 03:38 UTC Modified: 1999-09-06 16:25 UTC
From: mlemos at acm dot org Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (06/09/1999) OS: Linux RH 5.2
Private report: No CVE-ID: None
 [1999-09-06 03:38 UTC] mlemos at acm dot org
for(;;) no longer works right.

Code like as follows hangs forever.

<?

 for(;;)
 {
 }

?>

Code like this gives a parser error.

<?

 for(Unset($z);;)
 {
 }

?>

<br>                                                                            
<b>Parse error</b>:  parse error, expecting `';'' in <b>y.php</b> on line <b>3</b><br>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-06 16:25 UTC] andi at cvs dot php dot net
unset() is a statement and not an expression. It can't be used as an expression in the for expression. I don't think this worked with PHP 3.0 either.



 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Oct 22 19:01:23 2020 UTC