3v4l.org

run code in 300+ PHP versions simultaneously
<?php function change($input) { $return = $input; switch($input) { case 'X': $return = 6; break; case 6: $return = 'X'; break; } return $return; } var_dump(change(6)); var_dump(change('X')); var_dump(change('something_else'));
Output for git.master, git.master_jit, rfc.property-hooks
string(1) "X" int(6) string(14) "something_else"

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.21 ms | 405 KiB | 5 Q