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 jgNQu
Output for 5.4.10 - 5.4.45, 5.6.0 - 5.6.38, 7.0.0 - 7.3.0
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Object of class GMP could not be converted to string in /in/OacsA:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.11.1 - 3.21.3
Fatal error: Uncaught Error: Object of class GMP could not be converted to string in /in/OacsA:8 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.1
Catchable fatal error: Object of class GMP could not be converted to string in /in/OacsA on line 8
Process exited with code 255.
Output for 5.3.20 - 5.3.29, 5.5.0 - 5.5.38
Fatal error: Call to undefined function gmp_mul() in /in/OacsA on line 5
Process exited with code 255.