#33932 [Opn->Bgs]: get_class_vars return protected property
| From: | helly@php.net | Date: | Sun, 31 Jul 2005 17:58:45 +0000 |
| Subject: | #33932 [Opn->Bgs]: get_class_vars return protected property | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82731@lists.php.net to get a copy of this message | ||
ID: 33932
Updated by: helly@php.net
Reported By: boblecingle at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
-Operating System: Windows XP
+Operating System: *
-PHP Version: 5.0.4
+PHP Version: 5.*
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
The function respects the calling context, use it from outside the
class.
Previous Comments:
------------------------------------------------------------------------
[2005-07-30 23:57:01] boblecingle at hotmail dot com
Description:
------------
get_class_vars return protected property
or in the doc, get_class_vars must return PUBLIC property
Reproduce code:
---------------
class Person{
public $prenom;
protected $nom;
}
class Francais extends Person{
public $securiteSocial;
function test(){
print_r(get_class_vars("Francais"));
}
}
$p = new Francais();
$p->test();
Expected result:
----------------
Array ( [securiteSocial] => [prenom] => )
Actual result:
--------------
Array ( [securiteSocial] => [prenom] => [nom] => )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33932&edit=1