php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53349 Break out the two pages on magic methods/overloading
Submitted: 2010-11-19 02:27 UTC Modified: 2013-10-05 07:54 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: bastard dot internets at gmail dot com Assigned: krakjoe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2010-11-19 02:27 UTC] bastard dot internets at gmail dot com
Description:
------------
Suggest breaking /language.oop5.overloading.php and /language.oop5.magic.php manual pages into a group of sub pages, dedicating one page per magic method.

There is quite a lot of information missing in the docs on the behavior of magic methods, such as __get()'s special involvement with objects and arrays that are locked properties, __set()'s lack of involvement with objects and arrays that are locked properties, being able to define magic method function signatures in interfaces, being able to use __toString() to do something like 'echo new Test;', being able to define '&__get()' to return a locked property by reference, etc.

It would help to expand on the special behavior of each magic method, but the current pair of pages are getting too long and duplicating information, especially with all the user comments.

Test script:
---------------
n/a - involves manual pages


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-05 07:54 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2013-10-05 07:54 UTC] krakjoe@php.net
The documentation for magic methods etc is now extensive.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 18:00:02 2026 UTC