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

1.1       misho       1: --TEST--
                      2: SPL: iterator_apply() with callback using __call()
                      3: --FILE--
                      4: <?php
                      5: 
                      6: class Foo {
                      7:     public function __call($name, $params) {
                      8:         echo "Called $name.\n";
                      9:         return true;
                     10:     }
                     11: }
                     12: 
                     13: $it = new ArrayIterator(array(1, 2, 3));
                     14: 
                     15: iterator_apply($it, array(new Foo, "foobar"));
                     16: 
                     17: ?>
                     18: ===DONE===
                     19: <?php exit(0); ?>
                     20: --EXPECT--
                     21: Called foobar.
                     22: Called foobar.
                     23: Called foobar.
                     24: ===DONE===

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