3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.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
Output for hhvm-3.10.0

Process exited with code 153.