3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A {} class B extends A{} $b = 'B'; var_dump(is_subclass_of('A', 'A'), is_subclass_of('B', 'A'), is_subclass_of($b, 'A'));
Output for 5.0.3 - 7.1.0
bool(false) bool(true) bool(true)
Output for 4.3.0 - 5.0.2
bool(false) bool(false) bool(false)