3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $formatter = new NumberFormatter("en_US", NumberFormatter::DECIMAL); $formatter->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, 42); $formatter->setSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL, "'"); $formatter->setSymbol(NumberFormatter::DECIMAL_SEPARATOR_SYMBOL, ","); echo $formatter->format(123456.7891234), PHP_EOL;
based on TCAIA
Output for 5.6.38 - 7.3.0
123'456,7891234