ID:               30642
 Updated by:       [EMAIL PROTECTED]
 Reported By:      keith dot ward at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Class/Object related
 Operating System: Debian Linux r3 unstable
 PHP Version:      5CVS-2004-11-01 (dev)
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

var_dump() doesn't show static members.

And don't reopen this report - check your code


Previous Comments:
------------------------------------------------------------------------

[2004-11-01 04:53:01] keith dot ward at gmail dot com

Description:
------------
When using extend to extend a class . Static variables are not 
inherited .

Reproduce code:
---------------
class a
{
        public static $myvar;
        public function __construct()
        {
                $this->myvar = '1';
                echo ' Set myvar to 1 ... ' . "\n";
                var_dump($this);
        }
}

$a =  new a();
class b extends a
{
        function __construct()
        {
                echo 'DUmping from class b' . "\n";
                var_dump($this);
        }
}
$a = new b();
?>

Expected result:
----------------
 Set myvar to 1 ... 
object(a)#1 (1) {
  ["myvar"]=>
  string(1) "1"
}
Dumping from class b
object(b)#2 (1) {
  ["myvar"]=>
  string(1) "1"
}


Actual result:
--------------
 Set myvar to 1 ... 
object(a)#1 (1) {
  ["myvar"]=>
  string(1) "1"
}
Dumping from class b
object(b)#2 (0) {
}



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30642&edit=1

Reply via email to