3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $p = 14; function format($f) { $p = (int) ini_get('precision'); return (string) round($f, $p); } echo format(20/3) . "\n"; echo format(6.66) . "\n"; echo format(6) . "\n";
Output for 4.3.0 - 7.2.0
6.6666666666667 6.66 6