Syntax error

From: Date: Mon, 10 Sep 2001 15:09:43 +0000
Subject: Syntax error
Groups: php.dev 
Request: Send a blank email to php-dev+get-65663@lists.php.net to get a copy of this message
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@sys-net.it SysNet, Via Digione 8, 27100 Pavia - Italy

« previous php.dev (#65663) next »