3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 1; $i <= 10; $i++) { try { switch ($i) { case 2: throw new Exception('Exception: '. $i); break; } } catch (Exception $e) { echo '<pre>'. $e->getMessage() .'</pre>'; } echo '<pre>Loop count: '. $i .'</pre>'; }
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Loop count: 1</pre><pre>Exception: 2</pre><pre>Loop count: 2</pre><pre>Loop count: 3</pre><pre>Loop count: 4</pre><pre>Loop count: 5</pre><pre>Loop count: 6</pre><pre>Loop count: 7</pre><pre>Loop count: 8</pre><pre>Loop count: 9</pre><pre>Loop count: 10</pre>

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:
37.02 ms | 401 KiB | 8 Q