|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-06-16 08:58 UTC] sander@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 23:00:01 2025 UTC |
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?