3v4l.org

run code in 300+ PHP versions simultaneously
<?php function silnia($n) { return ($n <= 1) ? 1 : gmp_mul($n, silnia($n-1)); } $strSilnia = (string)silnia(60); $zeroCount = 0; for ($i = strlen($strSilnia)-1; $i >= 0; $i--) { echo $strSilnia[$i].PHP_EOL; }
Output for 5.6.8 - 5.6.20, 5.6.28, 7.0.0 - 7.0.5, 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.32, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 9 0 4 6 9 6 7 7 2 9 4 4 2 5 9 5 4 2 1 6 3 6 0 6 2 7 1 4 5 7 0 8 3 4 6 3 3 2 2 3 8 1 1 4 3 6 7 2 4 4 1 0 9 3 1 4 7 2 1 1 7 8 9 0 2 3 8
Output for 7.0.6, 7.3.32 - 7.3.33, 7.4.33, 8.0.13
Fatal error: Uncaught Error: Call to undefined function gmp_mul() in /in/tXGtR:5 Stack trace: #0 /in/tXGtR(8): silnia(60) #1 {main} thrown in /in/tXGtR on line 5
Process exited with code 255.
Output for 5.5.35, 5.6.21
Fatal error: Call to undefined function gmp_mul() in /in/tXGtR on line 5
Process exited with code 255.
Output for 5.5.24 - 5.5.34
1 2 1 # d i e c r u o s e R

preferences:
152.01 ms | 401 KiB | 184 Q