Bug #54804 [NEW]: __halt_compiler and imported namespaces
| From: | vrai at moechofe dot com | Date: | Wed, 18 May 2011 07:58:16 +0000 |
| Subject: | Bug #54804 [NEW]: __halt_compiler and imported namespaces | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-160799@lists.php.net to get a copy of this message | ||
From:
Operating system: Ubuntu 11.01 2.6.38-8-generic
PHP version: 5.3.6
Package: Compile Failure
Bug Type: Bug
Bug description:__halt_compiler and imported namespaces
Description:
------------
When importing namespace in a script using the __halt_compiler() function,
the imported script must use the same type of declaration (bracketed
namespace or unbracketed namespace).
Test script:
---------------
a.php
----
<?php
namespace a;
require_once 'b.php';
echo 'ok',PHP_EOL;
__halt_compiler(); // Remove this line and the script will works.
b.php
----
<?php
namespace b\c {}
namespace b\d {}
Expected result:
----------------
ok
Actual result:
--------------
Fatal error: Cannot mix bracketed namespace declarations with unbracketed
namespace declarations in b.php on line 2
--
Edit bug report at http://bugs.php.net/bug.php?id=54804&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54804&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54804&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54804&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54804&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54804&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54804&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54804&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54804&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54804&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54804&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54804&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54804&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54804&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54804&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54804&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54804&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54804&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54804&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54804&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54804&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54804&r=mysqlcfg