3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = "Dorothée"; echo "avant : ".$var; echo "<br />apres : ".stripAccents1($var); function stripAccents($string){ return strtr($string,'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ','aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY'); } function stripAccents1($string) { $string = utf8_encode($string); return html_entity_decode(preg_replace('~&([A-Za-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml|caron);~', '$1', htmlentities($string,ENT_QUOTES, 'UTF-8')), ENT_QUOTES, 'UTF-8')); } function minusculesSansAccents($texte) { $texte = str_replace( array('à', 'â', 'ä', 'á', 'ã', 'å', 'î', 'ï', 'ì', 'í', 'ô', 'ö', 'ò', 'ó', 'õ', 'ø', 'ù', 'û', 'ü', 'ú', 'é', 'è', 'ê', 'ë', 'ç', 'ÿ', 'ñ', ), array( 'a', 'a', 'a', 'a', 'a', 'a', 'i', 'i', 'i', 'i', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'e', 'e', 'e', 'e', 'c', 'y', 'n', ), $texte ); return $texte; }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.39
Parse error: syntax error, unexpected ')' in /in/1BnQ9 on line 15
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ')' in /in/1BnQ9 on line 15
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/1BnQ9 on line 15
Process exited with code 255.

preferences:
214.02 ms | 1395 KiB | 129 Q