3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP class Executor { public function go() { try { // 1. Throw exception in try block. throw new Exception("Failed to do something!"); return true; } finally { // 2. Throw and handle exception within finally block. // Note, this step could occur in a function/method which // is called within the finally block. try { throw new Exception("Failed to clean up."); } catch (Exception $E) { /* Ignore */ } } } } $Executor = new Executor(); // 3. Reference the return value. $value = $Executor->go();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Exception: Failed to do something! in /in/ifvo6:10 Stack trace: #0 /in/ifvo6(30): Executor->go() #1 {main} thrown in /in/ifvo6 on line 10
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
56.41 ms | 401 KiB | 8 Q