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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mlemos at acm dot org
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 19:01:35 2025 UTC