3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _normalizaString($string) { $a = "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ"; $b = "aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr"; $string = strtr(utf8_decode($string), utf8_decode($a), $b); return preg_replace('/\s+/', ' ', trim(strtolower($string), '()[]{}._\t\b\r')); } echo _normalizaString('açúcar');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H2plD
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               '_normalizastring'
          1        SEND_VAL                                                 'a%C3%A7%C3%BAcar'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function _normalizastring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H2plD
function name:  _normalizaString
number of ops:  29
compiled vars:  !0 = $string, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, '%C3%80%C3%81%C3%82%C3%83%C3%84%C3%85%C3%86%C3%87%C3%88%C3%89%C3%8A%C3%8B%C3%8C%C3%8D%C3%8E%C3%8F%C3%90%C3%91%C3%92%C3%93%C3%94%C3%95%C3%96%C3%98%C3%99%C3%9A%C3%9B%C3%9C%C3%9D%C3%9E%C3%9F%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%A8%C3%A9%C3%AA%C3%AB%C3%AC%C3%AD%C3%AE%C3%AF%C3%B0%C3%B1%C3%B2%C3%B3%C3%B4%C3%B5%C3%B6%C3%B8%C3%B9%C3%BA%C3%BB%C3%BD%C3%BD%C3%BE%C3%BF%C5%94%C5%95'
    6     2        ASSIGN                                                   !2, 'aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr'
    8     3        INIT_FCALL                                               'strtr'
          4        INIT_FCALL                                               'utf8_decode'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        SEND_VAR                                                 $5
          8        INIT_FCALL                                               'utf8_decode'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $7      
         14        ASSIGN                                                   !0, $7
    9    15        INIT_FCALL                                               'preg_replace'
         16        SEND_VAL                                                 '%2F%5Cs%2B%2F'
         17        SEND_VAL                                                 '+'
         18        INIT_FCALL                                               'trim'
         19        INIT_FCALL                                               'strtolower'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $9      
         22        SEND_VAR                                                 $9
         23        SEND_VAL                                                 '%28%29%5B%5D%7B%7D._%5Ct%5Cb%5Cr'
         24        DO_ICALL                                         $10     
         25        SEND_VAR                                                 $10
         26        DO_ICALL                                         $11     
         27      > RETURN                                                   $11
   10    28*     > RETURN                                                   null

End of function _normalizastring

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.23 ms | 1402 KiB | 24 Q