The following code contains a syntax error:
<?php
error_reporting (E_ALL);
for ($sz=1; $sz < 6; sz++) {
}
?>
the reported error is:
<b>Parse error</b>: parse error, expecting `')'' in <b>test.php</b> on line
<b>5</b><br>
Obviously sz++ is not a valid expression. But php-4.0.6 report a
misleading message in my opinion.
The following code give the same error but for a very different reason:
<?php
function A ()
{
static $a = array (
'a' => "a very " . "long string",
'c' => 'C'
);
}
?>
How can I help improving messages reported for syntax errors?
Ciao
--
Walter Franzini, e-mail: [EMAIL PROTECTED]
SysNet, Via Digione 8, 27100 Pavia - Italy
--
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]