3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = "Dorothée"; echo "avant : ".$var; echo "<br />apres : ".stripAccents($var); function stripAccents($string){ return strtr($string,'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ','aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY'); } 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; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O0mpR
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                                       'stripAccents'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $3      
          6        CONCAT                                           ~4      '%3Cbr+%2F%3Eapres+%3A+', $3
          7        ECHO                                                     ~4
   35     8      > RETURN                                                   1

Function stripaccents:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O0mpR
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 minusculessansaccents:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O0mpR
function name:  minusculesSansAccents
number of ops:  9
compiled vars:  !0 = $texte
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        INIT_FCALL                                               'str_replace'
   16     2        SEND_VAL                                                 <array>
   24     3        SEND_VAL                                                 <array>
   31     4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
   15     6        ASSIGN                                                   !0, $1
   34     7      > RETURN                                                   !0
   35     8*     > RETURN                                                   null

End of function minusculessansaccents

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.64 ms | 1396 KiB | 17 Q