<?php
class A
{
function A()
{
var_dump('A ctor');
}
}
class B extends A
{
function B()
{
var_dump('B ctor');
}
}
class C extends A
{
}
new A;
new B;
new C;
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/jcPin on line 3
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; B has a deprecated constructor in /in/jcPin on line 11
string(6) "A ctor"
string(6) "B ctor"
string(6) "A ctor"