ID:               16847
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Class/Object related
 Operating System: linux 2.4.0
 PHP Version:      4.1.2
 New Comment:

You have to call the parents constructor explicitely. That's by design.


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

[2002-04-26 06:54:40] [EMAIL PROTECTED]

When including an initialization function within both A and B classes,
creating an instance of he extending B class resets the variable
value created by initialization function withing the A class

class A {
        var $var_a;
        function A() {
                $this->var_a = "a";
        }
}

class B extends A {
        var $var_b;
        function B() {
                $this->var_b = "b";
        }
}

$test = new B;
echo $test->var_a; //no output unless I comment out function B() in
class B
echo $test->var_b;

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


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

Reply via email to