3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $my_num = 131510; $dec = number_format($my_num / 100, 3, '.', ','); echo $dec . "\n"; echo (float) $dec/100; echo PHP_EOL; $foo = "10510"; echo (float) number_format((float)$foo / 100, 3, '.', ''); // Outputs -> 105.00
based on dMfJh
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0beta1
1,315.100 0.01 105.1