3v4l.org

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