3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $p = 14; function format($f) { return (string) round($f, (int) ini_get('precision')); } 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.13.2
7 7 6