From:             [EMAIL PROTECTED]
Operating system: Win NT 4.0
PHP version:      4.2.2
PHP Bug Type:     Class/Object related
Bug description:  get_class_vars doesn't show values

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 bug report at http://bugs.php.net/?id=20295&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20295&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20295&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20295&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20295&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20295&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20295&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20295&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20295&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20295&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20295&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20295&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20295&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20295&r=isapi

Reply via email to