Re: BC break in 5.3.2 -> 5.3.3 with "parent::" and __call/__callStatic

From: Date: Tue, 26 Oct 2010 14:48:22 +0000
Subject: Re: BC break in 5.3.2 -> 5.3.3 with "parent::" and __call/__callStatic
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-49973@lists.php.net to get a copy of this message
On Mon, Oct 25, 2010 at 12:56:28AM +0200, Etienne Kneuss wrote: > Exactly, if Bar::getFoo is not called statically, parent::getFoo() will > not be a static call, it should not get through __callStatic. That logic sounds good. Unfortunately, things aren't behaving that way: <?php // Rework of code from http://bugs.php.net/bug.php?id=51176 class p { public function __call($n, $a) { echo "call\n"; } public static function __callStatic($n, $a) { echo "callStatic\n"; } } class c extends p { public function existing() { parent::non_existing(); } } $c = new c; echo 'static = '; c::s(); echo 'object = '; $c->o(); echo 'parent = '; $c->existing(); echo phpversion() . "\n"; Thanks, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.internals (#49973) next »