3v4l.org

run code in 300+ PHP versions simultaneously
<?php bcscale(10); // 10-digit precision after the decimal point $a = "437361267792869725786125260237139015281653755816161361862143‌7993378423467772036.0"; $b = "368751317941299998271978115652254748254929799689719709962831‌37471637224634055579‌.0"; $c = "154476802108746166441951315019919837485664325669565431700026‌63489825320203527799‌9.0"; $x = (string)bcdiv($a, (string)bcadd($b, $c)); echo "x = " . $x . "\n"; $y = (string)bcdiv($b, (string)bcadd($a, $c)); echo "y = " . $y . "\n"; $z = (string)bcdiv($c, (string)bcadd($b, $a)); echo "z = " . $z . "\n"; $f = (string)bcadd($x, (string)bcadd($y, $z)); echo "Total = " . $f . "\n"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ValueError: bcadd(): Argument #1 ($num1) is not well-formed in /in/NY43L:9 Stack trace: #0 /in/NY43L(9): bcadd('368751317941299...', '154476802108746...') #1 {main} thrown in /in/NY43L on line 9
Process exited with code 255.

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:
151.36 ms | 405 KiB | 5 Q