3v4l.org

run code in 300+ PHP versions simultaneously
<?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.

preferences:
176.55 ms | 1399 KiB | 61 Q