ID: 25441 Updated by: [EMAIL PROTECTED] Reported By: tater at potatoe dot com -Status: Open +Status: Closed Bug Type: Zend Engine 2 problem Operating System: OS X 10.2 PHP Version: 5CVS-2003-09-08 (dev) New Comment:
Works as expected with latest CVS. Seems to be fixed.. Previous Comments: ------------------------------------------------------------------------ [2003-09-08 18:21:54] tater at potatoe dot com Description: ------------ If a child class directly references a property defined in the parent class, it no longer inherits it. Reproduce code: --------------- <?php class base { public $x = 1; } class foo extends base { } class bar extends base { public function bartest() { var_dump($this->x); } } $base = new base; print_r($base); $foo = new foo; print_r($foo); $bar = new bar; print_r($bar); $bar->bartest(); ?> Expected result: ---------------- base Object ( [x] => 1 ) foo Object ( [x] => 1 ) bar Object ( [x] => 1 ) int(1) Actual result: -------------- base Object ( [x] => 1 ) foo Object ( [x] => 1 ) bar Object ( ) Notice: Undefined property: bar::$x in /path/bug.php on line 12 NULL ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25441&edit=1