php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #37105 "new self;" feature not properly documented
Submitted: 2006-04-17 13:02 UTC Modified: 2007-08-17 06:18 UTC
From: colder@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 + 4 = ?
Subscribe to this entry?

 
 [2006-04-17 13:02 UTC] colder@php.net
Description:
------------
The oop5 manual never talks about the ability to instanciate a class inside itself using "$instance = new self;".

The only occurence of this behavior is in a user comment in the reflection manual. It would be nice to have this stated somewhere.

Putting it in "The Basics"  under the "new" section would be a possibility:

Do you have any suggestion?




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-17 13:07 UTC] colder@php.net
Well, "$instance = new parent;" would have to be documented too.

Regards
 [2007-08-17 06:18 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.

new opeator: "In the class context, it is possible to create a new object by new self and new parent."
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 16 13:01:32 2024 UTC