|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[1998-07-29 12:02 UTC] mbrennen at fni dot com
The following script gives a parser error:
for ( $i = 0; $i < $k; $i++; ) { ... }
Removing the semicolon after $i++ fixes it:
for ( $i = 0; $i < $k; $i++ ) { ... }
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 06:00:01 2025 UTC |
How the heck is this a bug? The 'for' construct is defined as for(expr;expr;expr) { } An extra semi-colon does not match this definition. Find me another language with a C-style for-construct that will accept your syntax and I will give you a cookie.