Re: Ambiguity in the oop5 visibility docs
| From: | Christoph M. Becker | Date: | Fri, 25 May 2018 12:29:41 +0000 |
| Subject: | Re: Ambiguity in the oop5 visibility docs | ||
| References: | 1 | Groups: | php.doc php.internals |
| Request: | Send a blank email to internals+get-102132@lists.php.net to get a copy of this message | ||
On 17.05.2018 at 12:12, Andrey O Gromov wrote:
> Please take a look on patch "EN error fixed" from user "rjhdby"
>
>
> <emphasis>protected</emphasis> or
> <emphasis>private</emphasis>. Class members declared public can be
> accessed everywhere. Members declared protected can be accessed
> - only within the class itself and by inheriting and parent
> - classes. Members declared as private may only be accessed by the
> + only within the class itself and by inheriting.
> + Members declared as private may only be accessed by the
> class that defines the member.
> </para>
> -
> + <note>You can access protected members of a class or object from
> inherited methods.
> + Do <emphasis>NOT</emphasis> rely on this behavior, because it can be
> changed at any time.</note>
> <sect2 xml:id="language.oop5.visibility-members">
> <title>Property Visibility</title>
> <para>
I think we should discuss this on the internals@ mailing list. Perhaps
the current behavior is by design, and will “never” change.
--
Christoph M. Becker