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 git.master, git.master_jit, rfc.property-hooks
avant : Dorothée Deprecated: Function utf8_encode() is deprecated in /in/X51kW on line 14 <br />apres : DorothA©e

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