3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function quarter($month) { echo $month, " => ", ceil($month / 3), "\n"; } foreach (range(1, 12) as $i) { quarter($i); }
Output for 4.3.0 - 7.2.0
1 => 1 2 => 1 3 => 1 4 => 2 5 => 2 6 => 2 7 => 3 8 => 3 9 => 3 10 => 4 11 => 4 12 => 4