xref: /PHP-5.3/Zend/tests/magic_by_ref_010.phpt (revision ba144fd4)
1--TEST--
2passing arguments by ref to a method handled by __call()
3--INI--
4allow_call_time_pass_reference=1
5--FILE--
6<?php
7
8class 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
22var_dump($v);
23
24echo "Done\n";
25?>
26--EXPECTF--
27str
285
29int(5)
30Done
31