3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var; switch (false) { case isset($var): $var = ''; echo "Setting var" . PHP_EOL; case $var: // delberiate fall through, case $var is *not* caught, but we end here anyways. $var = 1; echo "Truthing Var" . PHP_EOL; case is_string($var): // delebirate fall through, case is_string($var) is *not* caught, but we end here anyways. $var = (string) $var; echo "Stringing var" . PHP_EOL; break; /* case customGuardFunction() */ default: echo "All checks passed!"; } var_dump($var);
Output for git.master, git.master_jit, rfc.property-hooks
Setting var Truthing Var Stringing var string(1) "1"

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