ID: 46665 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Scripting Engine problem Operating System: * PHP Version: 5.3CVS-2008-11-25 (snap) New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2008-11-25 19:43:45] [EMAIL PROTECTED] Changed category to the correct one. ------------------------------------------------------------------------ [2008-11-25 14:56:29] [EMAIL PROTECTED] Changing the category to something more accurate... ------------------------------------------------------------------------ [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