3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $separator = " "; echo preg_replace('/(?<=\d)\x' . bin2hex($separator[0]) . '(?=\d)/', $separator, number_format(12345678, 0, ".", $separator));
Output for 4.4.1 - 4.4.9, 5.0.5 - 7.1.0
12 345 678
Output for 4.3.0 - 4.4.0, 5.0.0 - 5.0.4
12,345,678