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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Thu May 16 17:01:37 2024 UTC