3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $normal = '0.00000601'; $direct = bcmul($normal, '3', 8); $referral = bcdiv($normal, '4', 8); $difference = bcsub(bcsub($normal, $direct, 8), $referral, 8); var_dump($direct, $referral, bcmul($difference, 30000 * 31, 8));
based on clhDH
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(10) "0.00001803" string(10) "0.00000150" string(12) "-12.57360000"