3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $matrix = [ 'ā' => 'a', 'ē' => 'e', 'ī' => 'i', 'ū' => 'u', 'š' => 's', 'ģ' => 'g', 'ķ' => 'k', 'ļ' => 'l', 'ž' => 'z', 'č' => 'c', 'ņ' => 'n', ]; $string = 'āāa'; $string = iconv('ISO-8859-1', 'ASCII//TRANSLIT//IGNORE', $string ); $string = strtr($string, $matrix); var_dump($string);
Output for 5.4.0 - 5.5.34, 5.6.8 - 5.6.20, 5.6.28, hhvm-3.12.0, 7.0.0 - 7.0.5, 7.0.14 - 7.1.0
string(5) "????a"
Output for 7.0.6
Fatal error: Uncaught Error: Call to undefined function iconv() in /in/frcph:18 Stack trace: #0 {main} thrown in /in/frcph on line 18
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.5.35, 5.6.21
Fatal error: Call to undefined function iconv() in /in/frcph on line 18
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/frcph on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/frcph on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/frcph on line 2
Process exited with code 255.