note 11729 added to get_class_vars
| From: | php-general at lists dot php dot net | Date: | Sun, 04 Mar 2001 23:52:12 +0000 |
| Subject: | note 11729 added to get_class_vars | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11849@lists.php.net to get a copy of this message | ||
It seems there is a unsaid behaviour/bug in the get_class_vars().
Try this one :
class TestClass {
var $V1;
var $V2 = "Val_2";
}
get_class_vars("TestClass ") will return array("V2" => NULL), ie no traces of
the "V1" class variable.
So it seems that an uninitialised var in a class will not appear in the array returned by
get_class_vars().
http://www.php.net/manual/en/function.get-class-vars.php