mirror of
https://github.com/php/php-src.git
synced 2025-01-12 05:54:13 +08:00
a555cc0b3d
Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
35 lines
528 B
PHP
35 lines
528 B
PHP
--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)
|