Edit report at http://bugs.php.net/bug.php?id=54804&edit=1
ID: 54804 Updated by: paj...@php.net Reported by: vrai at moechofe dot com Summary: __halt_compiler and imported namespaces Status: Assigned Type: Bug Package: Compile Failure Operating System: Ubuntu 11.01 2.6.38-8-generic PHP Version: 5.3.6 Assigned To: pierrick Block user comment: N Private report: N New Comment: Can you add a test case please? Previous Comments: ------------------------------------------------------------------------ [2011-05-19 12:46:34] pierr...@php.net The following patch has been added/updated: Patch Name: bug_54804 Revision: 1305801994 URL: http://bugs.php.net/patch-display.php?bug=54804&patch=bug_54804&revision=1305801994 ------------------------------------------------------------------------ [2011-05-18 09:58:15] vrai at moechofe dot com 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 this bug report at http://bugs.php.net/bug.php?id=54804&edit=1