overload extension

From: Date: Wed, 22 Oct 2003 23:33:24 +0000
Subject: overload extension
Groups: php.internals 
Request: Send a blank email to internals+get-4928@lists.php.net to get a copy of this message
The methods of an object that has been passed to the overload() function lose their ability to have parameters passed by reference. For example: class Foo {
    function hello(&$array)
    {
        $array[] = "hello";
    }
} $array = null; $foo = & new foo(); $foo->hello($array); print_r($array) Output: Array (
    [0] => hello
) class Foo extends PEAR_Autoloader {
    function hello(&$array)
    {
        $array[] = "hello";
    }
} $array = null; $foo = & new foo(); $foo->hello($array); print_r($array) Output: Nothing!

« previous php.internals (#4928) next »