#31543 [Opn]: get_class_vars does not return private & protected variables
ID: 31543
User updated by: du at bestwaytech dot com
Reported By: du at bestwaytech dot com
Status: Open
Bug Type: Class/Object related
Operating System: Windows XP
PHP Version: 5.0.3
New Comment:
Just confirmed that it works right using PHP 5.0.2 with same settings
Previous Comments:
------------------------------------------------------------------------
[2005-01-13 18:14:44] du at bestwaytech dot com
Description:
------------
get_class_vars does not return private and protected variables
Using PHP 5.0.3 with IIS under Windows XP Pro SP2
Reproduce code:
---------------
class test {
private $a = "private";
protected $b = "protected";
public $c = "public";
}
print_r(get_class_vars("test"));
Expected result:
----------------
Array
(
[a] => private
[b] => protected
[c] => public
)
Actual result:
--------------
Array
(
[c] => public
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31543&edit=1
Thread (3 messages)