ID: 14915 Updated by: torben Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Unknown/Other Function Operating System: Linux 2.4.9 PHP Version: 4.1.0 New Comment:
No bug; the code you have here is perfectly valid, although it contains one of those irritatingly hard-to-catch typo bugs. The semicolon indicates an empty statement. Your code says essentially "For every value of $i from $start up to and including 10, do nothing--then echo 'something'". For instance, the following are equivalent: for ($i = 1; $i <= 10; $i++) {} ...and... for ($i = 1; $i <= 10; $i++); Cheers, Torben Previous Comments: ------------------------------------------------------------------------ [2002-01-07 15:00:36] [EMAIL PROTECTED] when issuing the following syntactically incorrect 'for' statement nothing was returned (note the semi-colon before the parenthesis) even though at least one loop should take place. Should not a parse error be returned? for ($i = $start; $i <= 10; $i++); { echo 'something'; } './configure' '--with-mysql' '--with-apache=../apache_1.3.22' '--enable-track-vars' '--with-curl' '--with-dom' '--with-zlib' This is a public/production server so debugging is turned off. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14915&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]