#46795 [Com]: Documentation for get_class_vars return value is inconsistent ("public")
| From: | phpbug dot classvars at sub dot noloop dot net | Date: | Tue, 09 Dec 2008 10:15:13 +0000 |
| Subject: | #46795 [Com]: Documentation for get_class_vars return value is inconsistent ("public") | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-1606@lists.php.net to get a copy of this message | ||
ID: 46795
Comment by: phpbug dot classvars at sub dot noloop dot net
Reported By: phpbug dot classvars at sub dot noloop dot net
Status: Assigned
Bug Type: Documentation problem
Operating System: Linux
PHP Version: Irrelevant
Assigned To: kalle
New Comment:
Also see http://bugs.php.net/bug.php?id=46812
Previous Comments:
------------------------------------------------------------------------
[2008-12-08 11:43:19] phpbug dot classvars at sub dot noloop dot net
Description:
------------
The documentation at
http://no2.php.net/manual/en/function.get-class-vars.php
claims that:
"Return Values
Returns an associative array of default public properties of the class.
The resulting array elements are in the form of varname => value."
Apparently, since 5.2.7, the actual return value contains all default
visible properties of the class depending on the scope of the caller.
(Originally reported as a bug in http://bugs.php.net/bug.php?id=46761)
Therefore I'm opening this bug report against documentation. The docs
for this method should clarify that the return value may contain
properties that are declared as "protected" or even "private" depending
on calling scope.
Also ,it would be nice if the changelog could be updated with an entry
for PHP 5.2.7, since the behaviour changed since 5.2.6.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46795&edit=1