ID: 43033 Updated by: [EMAIL PROTECTED] Reported By: felipensp at gmail dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5.3CVS-2007-10-19 (snap) New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php foobar is not defined in the global namespace, but in the namespace A. Previous Comments: ------------------------------------------------------------------------ [2007-10-19 11:12:02] felipensp at gmail dot com Description: ------------ The README.namespace said "Note that using "new A" in namespace you can only create class from this namespace or internal PHP class, however using "new ::A" you are able to create any class from the global namespace." But, the class defined in global scope isn't found. Reproduce code: --------------- <?php namespace A; class foobar { public function test() { } } new ::foobar(); Expected result: ---------------- No error. Actual result: -------------- Fatal error: Class 'foobar' not found ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43033&edit=1