3v4l.org

run code in 300+ PHP versions simultaneously
<?php function translit($st) { $st = strtr($st, "абвгдежзийклмнопрстуфыэАБВГДЕЖЗИЙКЛМНОПРСТУФЫЭ", "abvgdegziyklmnoprstufieABVGDEGZIYKLMNOPRSTUFIE" ); $st = strtr($st, array( 'ё'=>"yo", 'х'=>"h", 'ц'=>"ts", 'ч'=>"ch", 'ш'=>"sh", 'щ'=>"shch", 'ъ'=>'', 'ь'=>'', 'ю'=>"yu", 'я'=>"ya", 'Ё'=>"Yo", 'Х'=>"H", 'Ц'=>"Ts", 'Ч'=>"Ch", 'Ш'=>"Sh", 'Щ'=>"Shch", 'Ъ'=>'', 'Ь'=>'', 'Ю'=>"Yu", 'Я'=>"Ya", )); return $st; } $t_word = 'Κέντρο τεχνολογικής άμυνας και επιστημονικής έρευνας'; if(preg_match('/[А-Яа-я]/i',$t_word)){ $t_word = translit($t_word); } echo $t_word; echo "\n"; echo metaphone($t_word,6);
Output for git.master, git.master_jit, rfc.property-hooks
Κέ�D�T�M�I �T�lχ�D�I�A�I�z�u�iή�O ά�Vυ�D�g�O �i�g�u �l�K�u�R�T�p�V�I�D�u�iή�O έ�M�lυ�D�g�O TTMTLT

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