ID: 20295 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Class/Object related Operating System: Win NT 4.0 PHP Version: 4.2.2 New Comment:
Sorry... This is not a bug... only initialized class variables are shown. Close this one Previous Comments: ------------------------------------------------------------------------ [2002-11-07 02:51:54] [EMAIL PROTECTED] class A { var $hello; var $world; function A() { $this->hello = "hello"; } } $a = get_class_vars("A"); foreach ($a as $key => $val) { echo $key . ": " . $val . "<br>"; } Output does not show the value as it suggests in the documentation. The output I get is: hello: world: Notice that the value of $hello is not shown. Docs say uninitialized variables are not shown. But clearly hello is initialized. Calling this: $a = get_class_vars("A"); print_r($a); Produces: Array ( [hello] => [world] => ) Which also is wrong because of no values in hello ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20295&edit=1