3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A {} class B extends A {} $b = new B(); $a = new A(); var_dump(get_class($b) == 'A'); var_dump(get_class($a) == 'A'); var_dump(is_a($b, 'A') && !is_subclass_of($b, 'A')); var_dump(is_a($a, 'A') && !is_subclass_of($a, 'A'));
Output for 5.3.0 - 7.1.0
bool(false) bool(true) bool(false) bool(true)
Output for 5.0.0 - 5.2.17
bool(false) bool(true) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/FOriH on line 12 bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/FOriH on line 13 bool(true)
Output for 4.3.0 - 4.4.9
bool(false) bool(false) bool(false) bool(true)