3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bcfact($n) { return ($n == 0 || $n== 1) ? 1 : bcmul($n,bcfact($n-1)); } function bcpi($precision) { $num = 0;$k = 0; bcscale($precision+3); $limit = ($precision+3)/14; while($k < $limit) { $num = bcadd($num, bcdiv(bcmul(bcadd('13591409',bcmul('545140134', $k)),bcmul(bcpow(-1, $k), bcfact(6*$k))),bcmul(bcmul(bcpow('640320',3*$k+1),bcsqrt('640320')), bcmul(bcfact(3*$k), bcpow(bcfact($k),3))))); ++$k; } return bcdiv(1,(bcmul(12,($num))),$precision); } echo bcpi(10000);
Output for git.master, git.master_jit, rfc.property-hooks

Process exited with code 137.

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:
38.99 ms | 401 KiB | 8 Q