[PHP-DEV] Syntax error From: Walter Franzini (walter <email protected>)
Date: 09/10/01

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: walter <email protected>
SysNet, Via Digione 8, 27100 Pavia - Italy

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>