3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = '31.8'; $b = '49.9'; $c = '129.4'; $total = '211.1'; bcscale(2); $subtotal = bcadd($a, $b); $subtotal = bcadd($subtotal, $c); var_dump(bcsub($total, $subtotal));
Output for 5.6.0, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.28, 7.4.0 - 7.4.21, 8.0.0 - 8.0.8
string(4) "0.00"

preferences:
182.34 ms | 459 KiB | 5 Q