From:             mx at tut dot by
Operating system: *
PHP version:      5CVS-2004-11-02 (dev)
PHP Bug Type:     Class/Object related
Bug description:  get_class_vars() works incorrect

Description:
------------
behavior of get_class_vars() changed between 13 Sep 2004 and 22 Oct 2004.
Is it correct?

Reproduce code:
---------------
<?

class A {
        private $user;
        protected $group;
        public $world;

        function dump() {
                print_r(get_object_vars($this));
        }
}

class B extends A {
        public $zoo;
}

$a = new B();
print_r(get_class_vars(get_class($a)));
print_r(get_object_vars($a));
$a->dump();

?>

Expected result:
----------------
Array ( [zoo] => [group] => [world] => )
Array ( [zoo] => [group] => [world] => )
Array ( [zoo] => [group] => [world] => )

Actual result:
--------------
Array ( [zoo] => [world] => ) 
Array ( [zoo] => [world] => ) 
Array ( [zoo] => [group] => [world] => )

-- 
Edit bug report at http://bugs.php.net/?id=30659&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30659&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30659&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30659&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30659&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30659&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30659&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30659&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30659&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30659&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30659&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30659&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30659&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30659&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30659&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30659&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30659&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30659&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30659&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30659&r=mysqlcfg

Reply via email to