3v4l.org

run code in 300+ PHP versions simultaneously
<? $a = new \NumberFormatter("it-IT", \NumberFormatter::DECIMAL); echo $a->format(10) . "<br>"; // outputs 12.345,12 $a->setAttribute(\NumberFormatter::MIN_FRACTION_DIGITS, 1000); $a->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, 1000); // by default some locales got max 2 fraction digits, that is probably not what you want echo $a->format(10) . "<br>"; // outputs 12.345,12345
Output for git.master, git.master_jit, rfc.property-hooks
<? $a = new \NumberFormatter("it-IT", \NumberFormatter::DECIMAL); echo $a->format(10) . "<br>"; // outputs 12.345,12 $a->setAttribute(\NumberFormatter::MIN_FRACTION_DIGITS, 1000); $a->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, 1000); // by default some locales got max 2 fraction digits, that is probably not what you want echo $a->format(10) . "<br>"; // outputs 12.345,12345

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
41.86 ms | 402 KiB | 8 Q