3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Item 36 is on page 2 Item 55 is on page 3 Item 96 is on page 5 Item 700 is on page 30
Output for 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /in/47Eai on line 5 Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /in/47Eai on line 7 Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /in/47Eai on line 9 Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /in/47Eai on line 11 Warning: A non-numeric value encountered in /in/47Eai on line 5 1 Warning: A non-numeric value encountered in /in/47Eai on line 7 1 Warning: A non-numeric value encountered in /in/47Eai on line 9 1 Warning: A non-numeric value encountered in /in/47Eai on line 11 1
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.26
Warning: A non-numeric value encountered in /in/47Eai on line 5 1 Warning: A non-numeric value encountered in /in/47Eai on line 7 1 Warning: A non-numeric value encountered in /in/47Eai on line 9 1 Warning: A non-numeric value encountered in /in/47Eai on line 11 1
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20
1 1 1 1

preferences:
247.06 ms | 403 KiB | 356 Q