In PHP both the way to declare a constructor and the way to make a call to a parent constructor have evolved. When declaring constructors with the
__construct
name, nested calls to parent constructors should also use the new __constructor
name.
Noncompliant code example
class Foo extends Bar {
function __construct() {
parent::Bar();
}
}
Compliant solution
class Foo extends Bar {
function __construct() {
parent::__construct();
}
}