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
3.4721359549996 5.3245553203368 6.7459666924148 7.9442719099992 9 9.9544511501033 10.832159566199 11.649110640674 12.416407864999 13.142135623731 13.832396974191 14.49193338483 15.124515496597 15.733200530682 16.320508075689 16.888543819998 17.439088914586 17.97366596101 18.493588689618 19

preferences:
42.73 ms | 406 KiB | 5 Q