Re: Inconsistencies when accessing protected members

From: Date: Tue, 25 Mar 2008 11:35:07 +0000
Subject: Re: Inconsistencies when accessing protected members
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-36487@lists.php.net to get a copy of this message
Hi, Am Dienstag, den 25.03.2008, 11:04 +0000 schrieb Robin Fernandes: [...] > My preference would be to completely remove this behaviour, by which > protected methods can be invoked from outside of their declaring > class's hierarchy. In other words, remove all uses of > zend_get_function_root_class() (it is only ever used in conjunction > with zend_check_protected()). Would that mean that the following code does not work anymore? <?php class Foo { protected function method() { } public function doSomething(Foo $foo) { $foo->method(); } } $foo1 = new Foo(); $foo1->doSomething(new Foo()); [...] cu, Lars

Attachment: [application/pgp-signature] Dies ist ein digital signierter Nachrichtenteil signature.asc
« previous php.internals (#36487) next »