Hi, Comment inline On Wed, 17 Nov 2004 20:19:01 -0600, Brent Clements <bclem@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote: > > <?php > > class foo { > > function foo () { > > echo "constructed!"; > > } > > } > > class childFoo extends foo { > > function childFoo() { > // here you should call the parent constructor: parent::foo() // also you could do this other way (I prefer the one above): $this->foo() > echo "constructed also!"; > > } > > } > > $a = new childFoo(); > > ?> > > Is there any way to run both the parent and child constructor? http://www.php.net/manual/en/language.oop.constructor.php http://www.php.net/manual/en/language.oop5.decon.php Regards, Jordi. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php