If there is no constructor in child class, then parent class constructor will be called (when appropriate parameters are passed)
class BaseClass {
    function __construct() {
        print "In BaseClass constructor\n";
    }
}

class SubClass extends BaseClass {
    function __construct() {
        parent::__construct();
        print "In SubClass constructor\n";
    }
}

class OtherSubClass extends BaseClass {
    // inherits BaseClass's constructor
}

// In BaseClass constructor
$obj = new BaseClass();

// In BaseClass constructor
// In SubClass constructor
$obj = new SubClass();

// In BaseClass constructor
$obj = new OtherSubClass();
by Valeri Tandilashvili
4 years ago
PHP
OOP
PHP official doc
1
Pro tip: use ```triple backticks around text``` to write in code fences