3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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; }
based on qXvXb
Output for 5.6.8 - 5.6.20, 5.6.28 - 7.0.5, 7.0.20 - 7.2.8
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
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.3.20 - 5.3.29, 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.4.10 - 5.5.34
1 2 1 # d i e c r u o s e R