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'));
Output for 5.3.9 - 7.1.0
bool(true) bool(false) bool(true) bool(false) bool(false) bool(false)
Output for 5.3.7 - 5.3.8
bool(true) bool(false) bool(true) bool(true) bool(true) bool(true)
Output for 5.3.0 - 5.3.6
bool(true) bool(false) bool(false) bool(false) bool(false) bool(false)
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/NKMFu on line 12 bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/NKMFu on line 13 bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/NKMFu on line 14 bool(false)
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/NKMFu on line 12 bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/NKMFu on line 13 bool(false) Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /in/NKMFu on line 14 bool(false)
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING in /in/NKMFu 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/NKMFu on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/NKMFu on line 5
Process exited with code 255.