|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-06-01 15:14 UTC] jim at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 22 19:00:01 2025 UTC |
At PHP2 it seemed to be very popular to use "while (expr); ... endwhile;". Also the usage of "while (expr): ... endwhile;" produced an error: parse error, expecting `END_TAG' or `';'' or `'{'' on line 8 (Note the different delimiters ';' and ':' after "while ()" With PHP3 the syntax changed to use ":" as the delimiter or (more likely) the users coded C syntax: "while (expr) { ... }". Put the parser misses to detect a falsely used ';' which causes an endless loop: (at least with PHP 3.0.7 and 3.0.8) <? $num=3; $i=0; while ($i<$num); Echo "$i, "; $i++; endwhile; ?>