3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class ABC extends ErrorException {} try { throw new ABC; } catch($e) { if($e instanceof ErrorException) { echo 'si'; } else { echo 'no'; } }
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '$e' (T_VARIABLE), expecting identifier (T_STRING) or namespace (T_NAMESPACE) or \\ (T_NS_SEPARATOR) in /in/dq16a on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR in /in/dq16a on line 8
Process exited with code 255.