From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.0.6
PHP Bug Type:     Scripting Engine problem
Bug description:  using echo for expression 3 in for loop creates parse error

Using Echo in expression 3 of a for loop creates a parse error.

For instance:

$blah = (0,1,2,3,4,5,6,7,8,9);
for ($i = 0; $i < 10; echo $blah[$i++]);

results in this error:

Parse error: parse error, expecting `')'' in
/home/chunky/public_html/test.php on line XX (line of for loop)

However, this will parse properly:

$blah = (0,1,2,3,4,5,6,7,8,9);
for ($i = 0; $i < 10; print $blah[$i++]);
-- 
Edit bug report at http://bugs.php.net/?id=15866&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=15866&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=15866&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=15866&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=15866&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15866&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=15866&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=15866&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=15866&r=submittedtwice

Reply via email to