3v4l.org

run code in 300+ PHP versions simultaneously
<?php const ENUM_RED = 1; const ENUM_BLUE = 2; const ENUM_GREEN = 4; function doSwitch($option) { switch ($option) { case ENUM_RED: return 'red'; case ENUM_BLUE: return 'blue'; case ENUM_GREEN: return 'green'; case ENUM_GREEN | ENUM_RED: return 'brown'; case ENUM_BLUE | ENUM_GREEN: return 'seagreen'; } } echo doSwitch(ENUM_RED | ENUM_GREEN);
Output for git.master, git.master_jit, rfc.property-hooks
brown

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