php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #39517 inaccurate or incomplete statement
Submitted: 2006-11-15 01:10 UTC Modified: 2007-08-17 11:57 UTC
From: thisbizness at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Windows XP
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: thisbizness at gmail dot com
New email:
PHP Version: OS:

 

 [2006-11-15 01:10 UTC] thisbizness at gmail dot com
Description:
------------
PHP Manual, Chap 19: Classes and Objects (PHP 5), Section: The Basics, Paragraph: 'extends'.
link: http://www.php.net/manual/en/language.oop5.basic.php

Manual Excerpt:
"It is possible to access the overrided method or members by referencing them with parent::"

My comments:
1- It is clearly possible to access parent *methods* like described. No problem here.

2- class *members* on the other hand need to be declared as static in the parent class in order to be referenced with the 'parent' or 'self' keywords by a child class.

3- Accessing static class members from instantiated class object is not possible (i.e. the '$this' self reference doesn't work with them), I suggest to include a reference link to the 'Static Keyword' page for explanation:  

PHP Manual, Chap 19: Classes and Objects (PHP 5), Section: Static Keyword.
link: http://www.php.net/manual/en/language.oop5.static.php



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-17 11:57 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 07 09:01:33 2025 UTC