3v4l.org

run code in 150+ 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 - 5.6.28, 7.0.0 - 7.1.0
6.6666666666667 6.66 6
Output for hhvm-3.10.0 - 3.12.0
7 7 6