Ambiguity in the oop5 visibility docs
| From: | Andrey O Gromov | Date: | Thu, 17 May 2018 10:12:35 +0000 |
| Subject: | Ambiguity in the oop5 visibility docs | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969386946@lists.php.net to get a copy of this message | ||
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>