12345678910111213141516171819202122232425262728293031323334 |
- --TEST--
- SPL: spl_autoload() with static methods
- --INI--
- include_path=.
- --FILE--
- <?php
- class MyAutoLoader {
- static function autoLoad($className) {
- echo __METHOD__ . "($className)\n";
- }
- }
- spl_autoload_register('MyAutoLoader::autoLoad');
- var_dump(spl_autoload_functions());
- // check
- var_dump(class_exists("TestClass", true));
- ?>
- --EXPECT--
- array(1) {
- [0]=>
- array(2) {
- [0]=>
- string(12) "MyAutoLoader"
- [1]=>
- string(8) "autoLoad"
- }
- }
- MyAutoLoader::autoLoad(TestClass)
- bool(false)
|