3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bcfact($n){ $factorial=$n; while (--$n>1) { echo $n. PHP_EOL; $factorial=bcmul($factorial,$n); } return $factorial; } echo PHP_EOL; echo PHP_EOL; echo PHP_EOL; print bcfact(5); $fact1 = gmp_fact(5.5); // 5 * 4 * 3 * 2 * 1 echo gmp_strval($fact1) . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
4 3 2 120 Deprecated: Implicit conversion from float 5.5 to int loses precision in /in/FBbRW on line 18 120

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
54.06 ms | 401 KiB | 8 Q