3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $perPage = 24; echo 'Item 36 is on page ' . floor(36 / $perPage) . "\n"; echo 'Item 55 is on page ' . floor(55 / $perPage) . "\n"; echo 'Item 96 is on page ' . floor(96 / $perPage) . "\n"; echo 'Item 700 is on page ' . floor(700 / $perPage) . "\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 1 Item 55 is on page 2 Item 96 is on page 4 Item 700 is on page 29