3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php ini_set('precision', 20); // craxy precision echo "<pre>"; echo 342349.23 - 341765.07, PHP_EOL; echo number_format(342349.23 - 341765.07, 2), PHP_EOL; echo bcsub(342349.23, 341765.07, 3), PHP_EOL; ?>
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, 7.0.0 - 7.1.0
<pre>584.15999999997438863 584.16 584.159
Output for hhvm-3.10.0 - 3.12.0
<pre>584.15999999997 584.16 584.160
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
<pre>584.15999999997438863 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/BCEIl on line 5 PHP_EOL584.16 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/BCEIl on line 6 PHP_EOL584.159 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/BCEIl on line 7 PHP_EOL