3v4l.org

run code in 500+ PHP versions simultaneously
<?php use BcMath\Number; $a = new Number('1.005691112'); $b = new Number('2.567891112'); $result = $a * $b; echo $result->round(2); echo PHP_EOL; echo $result; echo PHP_EOL; echo 1.005691112 * 2.567891112; echo PHP_EOL; echo 'precision is '.ini_get('precision');
Output for git.master_jit, git.master
2.58 2.582505267922196544 2.5825052679222 precision is 14

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:
21.42 ms | 753 KiB | 4 Q