ID: 46665 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open -Bug Type: Reproducible crash +Bug Type: *General Issues Operating System: Any PHP Version: 5.3CVS-2008-11-25 (snap) New Comment:
Changing the category to something more accurate... Previous Comments: ------------------------------------------------------------------------ [2008-11-25 14:45:15] [EMAIL PROTECTED] Description: ------------ Using a variable to instantiate a namespaced class (eg, new $foo();) causes truncated data to be passed to the autoloader when the class is prepended with \. Reproduce code: --------------- <?php // File 1 $baz = '\\Foo\\Bar\\Baz'; new $baz(); function __autoload($class) { var_dump($class); require './test.php'; } ?> <?php // File 2 namespace Foo\Bar; class Baz { } ?> Expected result: ---------------- Foo\Bar\Baz or \Foo\Bar\Baz in the var_dump Actual result: -------------- \Foo\Bar\Ba (missing the z) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46665&edit=1