3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = "Dorothée"; echo "avant : ".$var; echo "<br />apres : ".minusculesSansAccents($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','A','A','A','A','A','C','E','E','E','E','I','I','I','I','N','O','O','O','O','O','U','U','U','U','Y'), $texte ); return $texte; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8uqNU
function name:  (null)
number of ops:  9
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Doroth%C3%A9e'
    5     1        CONCAT                                           ~2      'avant+%3A+', !0
          2        ECHO                                                     ~2
    7     3        INIT_FCALL_BY_NAME                                       'minusculesSansAccents'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $3      
          6        CONCAT                                           ~4      '%3Cbr+%2F%3Eapres+%3A+', $3
          7        ECHO                                                     ~4
   27     8      > RETURN                                                   1

Function stripaccents:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8uqNU
function name:  stripAccents
number of ops:  8
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'strtr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A7%C3%A8%C3%A9%C3%AA%C3%AB%C3%AC%C3%AD%C3%AE%C3%AF%C3%B1%C3%B2%C3%B3%C3%B4%C3%B5%C3%B6%C3%B9%C3%BA%C3%BB%C3%BC%C3%BD%C3%BF%C3%80%C3%81%C3%82%C3%83%C3%84%C3%87%C3%88%C3%89%C3%8A%C3%8B%C3%8C%C3%8D%C3%8E%C3%8F%C3%91%C3%92%C3%93%C3%94%C3%95%C3%96%C3%99%C3%9A%C3%9B%C3%9C%C3%9D'
          4        SEND_VAL                                                 'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY'
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
   11     7*     > RETURN                                                   null

End of function stripaccents

Function stripaccents1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8uqNU
function name:  stripAccents1
number of ops:  22
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        INIT_FCALL                                               'utf8_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
   15     5        INIT_FCALL                                               'html_entity_decode'
          6        INIT_FCALL                                               'preg_replace'
          7        SEND_VAL                                                 '%7E%26%28%5BA-Za-z%5D%7B1%2C2%7D%29%28%3F%3Aacute%7Ccedil%7Ccirc%7Cgrave%7Clig%7Corn%7Cring%7Cslash%7Cth%7Ctilde%7Cuml%7Ccaron%29%3B%7E'
          8        SEND_VAL                                                 '%241'
          9        INIT_FCALL                                               'htmlentities'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 3
         12        SEND_VAL                                                 'UTF-8'
         13        DO_ICALL                                         $3      
         14        SEND_VAR                                                 $3
         15        DO_ICALL                                         $4      
         16        SEND_VAR                                                 $4
         17        SEND_VAL                                                 3
         18        SEND_VAL                                                 'UTF-8'
         19        DO_ICALL                                         $5      
         20      > RETURN                                                   $5
   16    21*     > RETURN                                                   null

End of function stripaccents1

Function minusculessansaccents:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8uqNU
function name:  minusculesSansAccents
number of ops:  9
compiled vars:  !0 = $texte
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        INIT_FCALL                                               'str_replace'
   21     2        SEND_VAL                                                 <array>
   22     3        SEND_VAL                                                 <array>
   23     4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
   20     6        ASSIGN                                                   !0, $1
   26     7      > RETURN                                                   !0
   27     8*     > RETURN                                                   null

End of function minusculessansaccents

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.29 ms | 1400 KiB | 25 Q