3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fn4 = fn ($totalCount) => sqrt($totalCount) - sqrt(1); $total = 1; for ($i = 1; $i <= 20; $i++) { echo sqrt($i) * 20 - sqrt(1); // echo "$total: " . ceil($fn4($i)); echo "\n"; $total++; }
Output for 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
19 27.284271247462 33.641016151378 39 43.721359549996 47.989794855664 51.915026221292 55.568542494924 59 62.245553203368 65.332495807108 68.282032302755 71.11102550928 73.833147735479 76.459666924148 79 81.462112512353 83.852813742386 86.177978870813 88.442719099992

preferences:
44.89 ms | 406 KiB | 5 Q