3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function round_up($val) { return ceil($val * 100) / 100); } $a = 5.4; $b = 48; var_dump($a * $b); var_dump(bcmul($a, $b, 2) * 1); var_dump(round_up($a * $b)); var_dump(round_up(bcmul($a, $b, 2))); echo "\n"; $a = 5.4; $b = 48.13; var_dump($a * $b); var_dump(bcmul($a, $b, 2) * 1); var_dump(round_up($a * $b)); var_dump(round_up(bcmul($a, $b, 2))); ?>
based on jG1JM
Output for 7.0.0
Parse error: syntax error, unexpected ')', expecting ';' in /in/uhpAo on line 5
Process exited with code 255.
Output for 5.3.20 - 5.6.16
Parse error: syntax error, unexpected ')' in /in/uhpAo on line 5
Process exited with code 255.