3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'This, is - - the URL!', 'Holmes & Yoyo', 'L’Œil de démon', 'How to win 1000€?', '€, $ & other currency symbols', 'Und die Katze fraß alle mäuse.', 'Яростта на живота в София', 'പോണ്ടിച്ചേരിയിൽ താമസിക്കുന്നതിന്റെ ക്രോധം', ]; $rules = <<<'RULES' # Transliteration :: Any-Latin ; :: Latin-Ascii ; # examples of custom replacements '&' > ' and '; [^0-9][01]? { € > ' euro'; € > ' euros'; [^0-9][01]? { '$' > ' dollar'; '$' > ' dollars'; :: Null; # slugify [^[:alnum:]&[:ascii:]]+ > '-'; :: Lower ; # trim [$] { '-' > &Remove(); '-' } [$] > &Remove(); RULES; $tsl = Transliterator::createFromRules($rules, Transliterator::FORWARD); $results = array_map(fn($s) => $tsl->transliterate($s), $strings); print_r($results);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => this-is-the-url [1] => holmes-and-yoyo [2] => l-oeil-de-demon [3] => how-to-win-1000-euros [4] => euro-dollar-and-other-currency-symbols [5] => und-die-katze-frass-alle-mause [6] => arostta-na-zivota-v-sofia [7] => peanticceriyi-tamasikkunnatinre-kreadham )

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:
25.76 ms | 406 KiB | 5 Q