3v4l.org

run code in 300+ PHP versions simultaneously
<?php function stripAccents($string) { return html_entity_decode(preg_replace('~&([A-Z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml|caron);~i', '$1', htmlentities($string, ENT_QUOTES, 'UTF-8')), ENT_QUOTES, 'UTF-8'); } echo stripAccents('écho');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j56ld
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'stripaccents'
          1        SEND_VAL                                                 '%C3%A9cho'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

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

End of function stripaccents

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.49 ms | 1398 KiB | 20 Q