3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $utf8 = 'Main ürtürmlicher weißer UTF-8-String mit öbszönen Grüßen!'; function transliterateUpper($in) { $save_locale = setlocale(LC_CTYPE, 'de_DE'); $out = mb_strtoupper( iconv('UTF-8', 'ASCII//TRANSLIT', $in) ); setlocale(LC_CTYPE, $save_locale); return $out; } var_dump(transliterateUpper($utf8));
Output for 5.3.20 - 5.5.34, 5.6.8 - 5.6.20, 5.6.28 - 7.0.5, 7.0.20 - 7.2.0
string(60) "MAIN ?RT?RMLICHER WEISSER UTF-8-STRING MIT ?BSZ?NEN GR?SSEN!"
Output for 7.0.6
Fatal error: Uncaught Error: Call to undefined function iconv() in /in/Z27u3:9 Stack trace: #0 /in/Z27u3(18): transliterateUpper('Main \xC3\xBCrt\xC3\xBCrmli...') #1 {main} thrown in /in/Z27u3 on line 9
Process exited with code 255.
Output for 5.5.35, 5.6.21
Fatal error: Call to undefined function iconv() in /in/Z27u3 on line 10
Process exited with code 255.