xref: /PHP-7.1/ext/spl/tests/bug44144.phpt (revision 113213f0)
1--TEST--
2Bug #44144 (spl_autoload_functions() should return object instance when appropriate)
3--SKIPIF--
4<?php if (!extension_loaded("spl")) print "skip"; ?>
5--FILE--
6<?php
7class Foo {
8  public function nonstaticMethod() {}
9}
10$foo = new Foo;
11spl_autoload_register(array($foo, 'nonstaticMethod'));
12$funcs = spl_autoload_functions();
13var_dump($funcs);
14?>
15--EXPECTF--
16array(1) {
17  [0]=>
18  array(2) {
19    [0]=>
20    object(Foo)#%d (0) {
21    }
22    [1]=>
23    string(15) "nonstaticMethod"
24  }
25}
26