3v4l.org

run code in 300+ PHP versions simultaneously
<?php $word = new NumberFormatter('en', NumberFormatter::SPELLOUT); $number = [1,5,10,15, 99, 10000000]; rsort($number); // sort by highest number first // make words from numbers $text = array_map(fn($num) => $word->format($num), $number); // example $str = '1 5 10 15 99 10000000'; echo str_replace($number, $text, $str);
Output for git.master, git.master_jit, rfc.property-hooks
one five ten fifteen ninety-nine ten million

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:
186.99 ms | 405 KiB | 5 Q