xref: /PHP-7.0/ext/spl/tests/spl_autoload_006.phpt (revision 610c7fbe)
1--TEST--
2SPL: spl_autoload() with static methods
3--INI--
4include_path=.
5--FILE--
6<?php
7
8class MyAutoLoader {
9
10        static function autoLoad($className) {
11        	echo __METHOD__ . "($className)\n";
12        }
13}
14
15spl_autoload_register('MyAutoLoader::autoLoad');
16
17var_dump(spl_autoload_functions());
18
19// check
20var_dump(class_exists("TestClass", true));
21
22?>
23===DONE===
24<?php exit(0); ?>
25--EXPECTF--
26array(1) {
27  [0]=>
28  array(2) {
29    [0]=>
30    string(12) "MyAutoLoader"
31    [1]=>
32    string(8) "autoLoad"
33  }
34}
35MyAutoLoader::autoLoad(TestClass)
36bool(false)
37===DONE===
38