3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=1; $b=0; switch($a) { default: $b += 1; break; default: $b += 2; } echo $b; //output would be 2
Output for git.master_jit, git.master
Warning: Module "Zend OPcache" is already loaded in Unknown on line 0 Warning: Zend OPcache: module registration failed! in Unknown on line 0 Fatal error: Switch statements may only contain one default clause in /in/9RtL8 on line 8 Stack trace: #0 {main}
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Switch statements may only contain one default clause in /in/9RtL8 on line 8
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:
162.18 ms | 996 KiB | 7 Q