3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $normal = '0.00000601'; $direct = bcdiv($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 vCmIU
Output for 4.3.0 - 5.4.45, 5.6.0 - 7.1.0
string(10) "0.00000200" string(10) "0.00000150" string(10) "2.33430000"
Output for 5.5.0 - 5.5.38
Fatal error: Call to undefined function bcdiv() in /in/clhDH on line 4
Process exited with code 255.