3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function retry($retries) { while($retries--){ try { throw new \Exception(); return; } catch (\Exception $e) {} } throw new FailingTooHardException('', 0, $e); } retry(5);
based on 7eKeH
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Class 'FailingTooHardException' not found in /in/lRInQ:10 Stack trace: #0 /in/lRInQ(13): retry(-1) #1 {main} thrown in /in/lRInQ on line 10
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Class undefined: FailingTooHardException in /in/lRInQ on line 10
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Fatal error: Class 'FailingTooHardException' not found in /in/lRInQ on line 10
Process exited with code 255.
Output for 5.0.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/lRInQ on line 6 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/lRInQ on line 8 Fatal error: Class 'FailingTooHardException' not found in /in/lRInQ on line 10
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/lRInQ 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 '{' in /in/lRInQ on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/lRInQ on line 5
Process exited with code 255.