3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print sprintf('%g', 0.001); print sprintf('%g', 0); print sprintf('%g', 1000000); print sprintf('%g', 100); print sprintf('%g', -1); print sprintf('%g', 0.00000001); print sprintf('%g', -0.00000001);
Output for 5.2.1 - 7.1.0
0.00101.0e+6100-11.0e-8-1.0e-8
Output for 4.3.0 - 5.2.0