Doc #73779 [Opn->Ver]: typo with different semantics on visibility page
| From: | cmb@php.net | Date: | Mon, 19 Dec 2016 15:31:11 +0000 |
| Subject: | Doc #73779 [Opn->Ver]: typo with different semantics on visibility page | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14275@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73779&edit=1
ID: 73779
Updated by: cmb@php.net
Reported by: pjvleeuwen at gmail dot com
Summary: typo with different semantics on visibility page
-Status: Open
+Status: Verified
Type: Documentation Problem
-Package: Documentation problem
+Package: Class/Object related
PHP Version: 7.1.0
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2016-12-18 09:07:21] pjvleeuwen at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/language.oop5.visibility
---
This sentence does not seem to be correct:
"Members declared protected can be accessed only within the class itself and by inherited
classes."
I believe what the author meant is:
"Members declared protected can be accessed only within the class itself and by inheriting
classes."
In other words: if class C extends class B which extends class A, then a protected member of B can
be accessed by C. With the current text "inherited classes" suggest that class A can
access protected members of B.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73779&edit=1