Bug #63372 [Opn->Csd]: Namespace Declaration Missing Parse Error
| From: | hanskrentel at yahoo dot de | Date: | Fri, 26 Oct 2012 20:51:52 +0000 |
| Subject: | Bug #63372 [Opn->Csd]: Namespace Declaration Missing Parse Error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-174374@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63372&edit=1
ID: 63372
User updated by: hanskrentel at yahoo dot de
Reported by: hanskrentel at yahoo dot de
Summary: Namespace Declaration Missing Parse Error
-Status: Open
+Status: Closed
Type: Bug
-Package: Class/Object related
+Package: Scripting Engine problem
PHP Version: 5.4.8
Block user comment: N
Private report: N
New Comment:
Solved. Thanks NikiC http://stackoverflow.com/a/13094151/367456
Previous Comments:
------------------------------------------------------------------------
[2012-10-26 19:15:37] hanskrentel at yahoo dot de
Description:
------------
The following file namespace declaration:
namespace \Name;
Does not give a Parse Error. It's sister declaration:
namespace \Name {}
does.
Test script:
---------------
<?php
namespace \Name;
Expected result:
----------------
Parse Error in Line 2 about an unexpected ; or T_NAMESPACE_SEPARATOR
Actual result:
--------------
Parser has no problem with the file at all.
Problems become only noticeable at runtime then.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63372&edit=1