3v4l.org

run code in 300+ PHP versions simultaneously
<?php function makeCatList($param){ $arResult = array(); $s = array("@[aаА]@u","@[bбБ]@u","@[cсС]@u","@[dдД]@u","@[eеЕ]@u","@[tтТ]@u","@[rрР]@u","@TB@u"); $r = array("A","B","C","D","E","T","r","Tb"); $param["string"] = preg_replace($s, $r, $param["string"]); if(preg_match_all("/((?:[A-D]1)|(?:[A-D][E]?)|(Tr|Tb))/u", $param["string"], $mCats)){ //unset($mCats[0]); print_r($mCats); return asort($mCats); } else return false; } print_r(makeCatList(array("string"=>"сАв1beс1edeTr")));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V0Xjf
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'makecatlist'
          2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function makecatlist:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 27
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V0Xjf
function name:  makeCatList
number of ops:  29
compiled vars:  !0 = $param, !1 = $arResult, !2 = $s, !3 = $r, !4 = $mCats
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, <array>
    5     3        ASSIGN                                                   !3, <array>
    6     4        INIT_FCALL                                               'preg_replace'
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !3
          7        FETCH_DIM_R                                      ~9      !0, 'string'
          8        SEND_VAL                                                 ~9
          9        DO_ICALL                                         $10     
         10        ASSIGN_DIM                                               !0, 'string'
         11        OP_DATA                                                  $10
    7    12        INIT_FCALL                                               'preg_match_all'
         13        SEND_VAL                                                 '%2F%28%28%3F%3A%5BA-D%5D1%29%7C%28%3F%3A%5BA-D%5D%5BE%5D%3F%29%7C%28Tr%7CTb%29%29%2Fu'
    8    14        FETCH_DIM_R                                      ~11     !0, 'string'
         15        SEND_VAL                                                 ~11
         16        SEND_REF                                                 !4
         17        DO_ICALL                                         $12     
         18      > JMPZ                                                     $12, ->27
   10    19    >   INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !4
         21        DO_ICALL                                                 
   11    22        INIT_FCALL                                               'asort'
         23        SEND_REF                                                 !4
         24        DO_ICALL                                         $14     
         25      > RETURN                                                   $14
         26*       JMP                                                      ->28
   12    27    > > RETURN                                                   <false>
   13    28*     > RETURN                                                   null

End of function makecatlist

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.12 ms | 1398 KiB | 22 Q