From: rpanning at hotmail dot com
Operating system: Windows XP SP2
PHP version: 5.3CVS-2008-01-16 (snap)
PHP Bug Type: SPL related
Bug description: Autoload Functions in Namespaces
Description:
------------
Currently spl_autoload_register() is unable to load any functions or class
static functions in namespaces.
Reproduce code:
---------------
namespace NS;
function load_class($name) {
// load class file
}
class Test {
public static function load_class($name) {
// load class file
}
}
spl_autoload_register(array('NS', 'load_class'));
spl_autoload_register(array('NS', 'Test', 'load_class'));
var_dump(spl_autoload_functions());
Expected result:
----------------
Should output an array with the registered namespace function and
namespace class static function.
Actual result:
--------------
Fatal error: Uncaught exception 'LogicException' with message 'Passed
array does not specify an existing static method' in C:\PHP\file.php:14
Stack trace: #0 C:\PHP\file.php(14): spl_autoload_register(Array) #1 {main}
thrown in C:\PHP\file.php on line 14
--
Edit bug report at http://bugs.php.net/?id=43862&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43862&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43862&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43862&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43862&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43862&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43862&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43862&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43862&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43862&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43862&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43862&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43862&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43862&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43862&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43862&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43862&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43862&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43862&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43862&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43862&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43862&r=mysqlcfg