Bug #2310: Constructor not being called

From: Date: Wed, 15 Sep 1999 20:21:22 +0000
Subject: Bug #2310: Constructor not being called
Groups: php.dev 
Request: Send a blank email to php-dev+get-10972@lists.php.net to get a copy of this message
From: bobval@zedak.com Operating system: Red Hat Linux PHP version: 3.0.12 PHP Bug Type: Other Bug description: Constructor not being called I have a class B that extends class A The constructor for Class never gets called. class A { A() { print("Hi from Class A"); } Nothing() { print("Class A - Nothing"); } } class B extends A { B() { print("Hi from Class B"); } } $ClassB = new B; $ClassB->Nothing(); When I create a class B the B constructor gets called but NOT the class A constructor. How do I get the A constructor to be called as well?

« previous php.dev (#10972) next »