3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $range = range(-5,5); //var_dump($range); foreach($range as $item){ switch($item){ case ($item<=16): $case = '<16'; break; case ( ($item>=17) && ($item<=20)): $case = '>=17_<=20'; break; case ( ($item>=21) && ($item<=25)): $case = '>=21_<=25'; break; } echo $item.' '.$case."\n"; }
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
-5 <16 -4 <16 -3 <16 -2 <16 -1 <16 0 >=17_<=20 1 <16 2 <16 3 <16 4 <16 5 <16
Output for hhvm-3.10.0

Process exited with code 153.