3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tax = bcmul("33.95", ".065", 2); // 2.20675 $real_total = bcadd("33.95", "7.87", 2); // 41.82 //$real_total = bcadd($real_total, $tax, 2); // 44.02675 echo $real_total; function bcround($number, $scale = 0) { $fix = "5"; for ($i=0; $i<$scale; $i++) $fix = "0$fix"; $number = bcadd($number, "0.$fix", $scale + 1); return bcdiv($number, "1.0", $scale); }
Output for git.master, git.master_jit, rfc.property-hooks
41.82

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