summaryrefslogtreecommitdiff
path: root/ext/spl/tests/spl_007.phpt
blob: 6d4059d0b5fed7f2451080299488a540106aff51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
SPL: iterator_apply() with callback using __call()
--FILE--
<?php

class Foo {
    public function __call($name, $params) {
        echo "Called $name.\n";
        return true;
    }
}

$it = new ArrayIterator(array(1, 2, 3));

iterator_apply($it, array(new Foo, "foobar"));

?>
===DONE===
<?php exit(0); ?>
--EXPECT--
Called foobar.
Called foobar.
Called foobar.
===DONE===