Bug #54804 [PATCH]: __halt_compiler and imported namespaces

From: Date: Thu, 19 May 2011 11:04:30 +0000
Subject: Bug #54804 [PATCH]: __halt_compiler and imported namespaces
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-160831@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=54804&edit=1 ID: 54804 Patch added by: pierrick@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: The following patch has been added/updated: Patch Name: bug_54804_with_test.diff Revision: 1305803069 URL: http://bugs.php.net/patch-display.php?bug=54804&patch=bug_54804_with_test.diff&revision=1305803069 Previous Comments: ------------------------------------------------------------------------ [2011-05-19 12:57:15] pajoye@php.net Can you add a test case please? ------------------------------------------------------------------------ [2011-05-19 12:46:34] pierrick@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

« previous php.bugs (#160831) next »