Date: 09/10/01
- Next message: Jason Greene: "[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Right/Left Shift Zero Fill operator"
- Previous message: Alexander Wirtz: "Re: [PHP-DEV] Re: [Zend Engine 2] Right/Left Shift Zero Fill operator"
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] Syntax error"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Syntax error"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Syntax error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
- Next message: Jason Greene: "[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Right/Left Shift Zero Fill operator"
- Previous message: Alexander Wirtz: "Re: [PHP-DEV] Re: [Zend Engine 2] Right/Left Shift Zero Fill operator"
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] Syntax error"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Syntax error"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Syntax error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

