3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $numberFormatted = number_format("15.08", 2); if ( 0 === preg_match('/\d+.[^1-9]+/', $numberFormatted)) { echo round($numberFormatted); } echo $numberFormatted;
based on T1oJB
Output for 5.3.18 - 7.3.0rc4
15.08