ID: 50038
User updated by: me at gerryevans dot com
Reported By: me at gerryevans dot com
Status: Open
Bug Type: Unknown/Other Function
Operating System: CentOS
PHP Version: 5.3.0
New Comment:
I have tested this error on a CentOS server running Apache 2 + PHP 5.3
and Lighttpd + PHP 5.3.
The php.ini both times was a php.ini-production with the only change
"expose_php" to Off.
Previous Comments:
------------------------------------------------------------------------
[2009-10-30 10:35:03] me at gerryevans dot com
Description:
------------
PHP doesn't like it when a namespace starts with a number for example a
namespace 12eggs will get a parse error ("syntax error, unexpected
T_LNUMBER, expecting T_STRING or T_NS_SEPARATOR or '{'").
Reproduce code:
---------------
<?php
namespace 12eggs;
echo __NAMESPACE__;
?>
Expected result:
----------------
12eggs
Actual result:
--------------
Parse error: syntax error, unexpected T_LNUMBER, expecting T_STRING or
T_NS_SEPARATOR or '{' in FILE on line 3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50038&edit=1