3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach( array(1,2,3,4) as $a) { $b = $a * 2; } echo $a, ' ', $b, "\r\n"; switch( $a ) { case 4: $c = 5; break; } echo $c, "\r\n"; try { $d = 5; throw new Exception; } catch(Exception $ex) { $e = 6; } echo $d, ' ', $e, ' ', gettype($ex), "\r\n";
Output for git.master, git.master_jit, rfc.property-hooks
4 8 5 5 6 object

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:
170.97 ms | 405 KiB | 5 Q