3v4l.org

run code in 200+ 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 - 7.2.0
-5 <16 -4 <16 -3 <16 -2 <16 -1 <16 0 >=17_<=20 1 <16 2 <16 3 <16 4 <16 5 <16