bug44144.phpt 423 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #44144 (spl_autoload_functions() should return object instance when appropriate)
  3. --FILE--
  4. <?php
  5. class Foo {
  6. public function nonstaticMethod() {}
  7. }
  8. $foo = new Foo;
  9. spl_autoload_register(array($foo, 'nonstaticMethod'));
  10. $funcs = spl_autoload_functions();
  11. var_dump($funcs);
  12. ?>
  13. --EXPECTF--
  14. array(1) {
  15. [0]=>
  16. array(2) {
  17. [0]=>
  18. object(Foo)#%d (0) {
  19. }
  20. [1]=>
  21. string(15) "nonstaticMethod"
  22. }
  23. }