Annotation of embedaddon/php/ext/spl/tests/bug44144.phpt, revision 1.1.1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>