3v4l.org

run code in 300+ PHP versions simultaneously
<?php function stripAccents($string) { echo htmlentities($string, ENT_QUOTES, 'UTF-8'); return html_entity_decode(preg_replace('~&([A-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'); } echo stripAccents('Âécho');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/grP2H
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'stripaccents'
          1        SEND_VAL                                                 '%C3%82%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/grP2H
function name:  stripAccents
number of ops:  24
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'htmlentities'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 3
          4        SEND_VAL                                                 'UTF-8'
          5        DO_ICALL                                         $1      
          6        ECHO                                                     $1
    4     7        INIT_FCALL                                               'html_entity_decode'
          8        INIT_FCALL                                               'preg_replace'
          9        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%7E'
         10        SEND_VAL                                                 '%241'
         11        INIT_FCALL                                               'htmlentities'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 3
         14        SEND_VAL                                                 'UTF-8'
         15        DO_ICALL                                         $2      
         16        SEND_VAR                                                 $2
         17        DO_ICALL                                         $3      
         18        SEND_VAR                                                 $3
         19        SEND_VAL                                                 3
         20        SEND_VAL                                                 'UTF-8'
         21        DO_ICALL                                         $4      
         22      > RETURN                                                   $4
    5    23*     > RETURN                                                   null

End of function stripaccents

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.75 ms | 1399 KiB | 20 Q