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] => belite-rozi-na-sofia [7] => peanticceri-suryanu-kili )

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