3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=2; $b=0; switch($a) { case 1: default: $b += 1; break; default: $b += 2; } echo $b; //output would be 1
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
2

preferences:
208.99 ms | 1400 KiB | 109 Q