Re: __call() magic method

From: Date: Sat, 30 Aug 2008 21:02:18 +0000
Subject: Re: __call() magic method
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-40173@lists.php.net to get a copy of this message
Cristian Rodríguez wrote:
Diogo Neves escribió:
Hi all, I'm emailling to ask why __call isn't called when you call a private method from outside of function...
Please provide example code ;-)
He means this: class foo { private function bar() { } function __call($f,$a) {
    echo "called $f";
} } $a = new foo; $a->bar();

« previous php.internals (#40173) next »