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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: colder@php.net
New email:
PHP Version: OS:

 

 [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: Mon Apr 29 18:01:30 2024 UTC