3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $perPage = 24; echo 'Item 36 is on page ' . (floor(36 / $perPage) + 1) . "\n"; echo 'Item 55 is on page ' . (floor(55 / $perPage) + 1) . "\n"; echo 'Item 96 is on page ' . (floor(96 / $perPage) + 1) . "\n"; echo 'Item 700 is on page ' . (floor(700 / $perPage) + 1) . "\n";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Item 36 is on page 2 Item 55 is on page 3 Item 96 is on page 5 Item 700 is on page 30