Re: Inconsistencies when accessing protected members
| From: | Felipe Pena | Date: | Tue, 25 Mar 2008 11:42:27 +0000 |
| Subject: | Re: Inconsistencies when accessing protected members | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-36488@lists.php.net to get a copy of this message | ||
Em Ter, 2008-03-25 às 12:35 +0100, Lars Strojny escreveu:
> 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());
>
This still will works.