Annotation of embedaddon/php/Zend/tests/magic_by_ref_010.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: passing arguments by ref to a method handled by __call()
3: --INI--
4: allow_call_time_pass_reference=1
5: --FILE--
6: <?php
7:
8: class Foo {
9: function __call($method, $args)
10: {
11: print $args[0]."\n";
12: $args[0] = 5;
13: print $args[0]."\n";
14: return true;
15: }
16: }
17:
18: $v = 'str';
19: $o = new Foo();
20: $o->test(&$v);
21:
22: var_dump($v);
23:
24: echo "Done\n";
25: ?>
26: --EXPECTF--
27: str
28: 5
29: int(5)
30: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>