Annotation of embedaddon/php/tests/classes/__call_003.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Force pass-by-reference to __call
3: --FILE--
4: <?php
5: class C
6: {
7: function __call($name, $values)
8: {
9: $values[0][0] = 'changed';
10: }
11: }
12:
13: $a = array('original');
14:
15: $b = array('original');
16: $hack =& $b[0];
17:
18: $c = new C;
19: $c->f($a);
20: $c->f($b);
21:
22: var_dump($a, $b);
23: ?>
24: --EXPECTF--
25: array(1) {
26: [0]=>
27: string(8) "original"
28: }
29: array(1) {
30: [0]=>
31: &string(7) "changed"
32: }
33:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>