<?php
class A { function a() {echo "a";} }
class B { function a() {echo "b";} }
class C extends A { function a() {echo "c";} }
$b = new B();
var_dump($b instanceof A);
$c = new C();
var_dump($c instanceof A);
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/cft7Z on line 2
bool(false)
abool(true)