3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $normal = '0.00000240'; $direct = bcmul($normal, 1 / 3, 8); $direct2 = bcdiv($normal, 3, 8); $referral = bcdiv($normal, '4', 8); $difference = bcsub(bcsub($normal, $direct, 8), $referral, 8); var_dump($direct, $direct2, $referral, bcmul($difference, 30000 * 31, 8));
based on KvZJX
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(10) "0.00000079" string(10) "0.00000080" string(10) "0.00000060" string(10) "0.93930000"