3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A {} class B extends A {} interface C {} class D implements C {} var_dump(is_subclass_of('B','A')); var_dump(is_subclass_of('A','A')); var_dump(is_subclass_of('D','C')); var_dump(is_a('B','A')); var_dump(is_a('A','A')); var_dump(is_a('D','C')); var_dump(is_a('B','A',true)); var_dump(is_a('A','A',true)); var_dump(is_a('D','C',true));
Output for 5.3.9 - 7.1.0
bool(true) bool(false) bool(true) bool(false) bool(false) bool(false) bool(true) bool(true) bool(true)
Output for 5.3.7 - 5.3.8
bool(true) bool(false) bool(true) bool(true) bool(true) bool(true) Warning: is_a() expects exactly 2 parameters, 3 given in /in/fcWuq on line 16 NULL Warning: is_a() expects exactly 2 parameters, 3 given in /in/fcWuq on line 17 NULL Warning: is_a() expects exactly 2 parameters, 3 given in /in/fcWuq on line 18 NULL
Output for 5.3.0 - 5.3.6
bool(true) bool(false) bool(false) bool(false) bool(false) bool(false) Warning: is_a() expects exactly 2 parameters, 3 given in /in/fcWuq on line 16 NULL Warning: is_a() expects exactly 2 parameters, 3 given in /in/fcWuq on line 17 NULL Warning: is_a() expects exactly 2 parameters, 3 given in /in/fcWuq on line 18 NULL
Output for 5.0.3 - 5.2.17
bool(true) bool(false) bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 12 bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 13 bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 14 bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 16 Warning: Wrong parameter count for is_a() in /in/fcWuq on line 16 NULL Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 17 Warning: Wrong parameter count for is_a() in /in/fcWuq on line 17 NULL Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 18 Warning: Wrong parameter count for is_a() in /in/fcWuq on line 18 NULL
Output for 5.0.0 - 5.0.2
bool(false) bool(false) bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 12 bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 13 bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 14 bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 16 Warning: Wrong parameter count for is_a() in /in/fcWuq on line 16 NULL Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 17 Warning: Wrong parameter count for is_a() in /in/fcWuq on line 17 NULL Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/fcWuq on line 18 Warning: Wrong parameter count for is_a() in /in/fcWuq on line 18 NULL
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING in /in/fcWuq on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING in /in/fcWuq on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/fcWuq on line 5
Process exited with code 255.