File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / magic_by_ref_010.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (12 years, 4 months ago) by misho
Branches: php, MAIN
CVS tags: v5_3_10, HEAD
php

--TEST--
passing arguments by ref to a method handled by __call()
--INI--
allow_call_time_pass_reference=1
--FILE--
<?php

class Foo {
    function __call($method, $args)
    {
        print $args[0]."\n";
        $args[0] = 5;
        print $args[0]."\n";
        return true;
    }
}

$v = 'str';
$o = new Foo();
$o->test(&$v);

var_dump($v);

echo "Done\n";
?>
--EXPECTF--	
str
5
int(5)
Done

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