3v4l.org

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

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:
50.78 ms | 401 KiB | 8 Q