3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { private function dummyErrorHandler() { return false; } public function resetErrors() { set_error_handler(array($this, 'dummyErrorHandler'), 0); @$undefinedVariable; restore_error_handler(); } $e = new Example; $e->resetErrors();
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '$e' (T_VARIABLE), expecting function (T_FUNCTION) in /in/AO1cJ on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /in/AO1cJ on line 11
Process exited with code 255.

preferences:
180.8 ms | 1395 KiB | 61 Q