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)){ $arCats = sort($mCats[0]); return asort($arCats); } 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/vARuS
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     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 = 29
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vARuS
function name:  makeCatList
number of ops:  31
compiled vars:  !0 = $param, !1 = $arResult, !2 = $s, !3 = $r, !4 = $mCats, !5 = $arCats
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                                      ~10     !0, 'string'
          8        SEND_VAL                                                 ~10
          9        DO_ICALL                                         $11     
         10        ASSIGN_DIM                                               !0, 'string'
         11        OP_DATA                                                  $11
    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                                      ~12     !0, 'string'
         15        SEND_VAL                                                 ~12
         16        SEND_REF                                                 !4
         17        DO_ICALL                                         $13     
         18      > JMPZ                                                     $13, ->29
    9    19    >   INIT_FCALL                                               'sort'
         20        FETCH_DIM_W                                      $14     !4, 0
         21        SEND_REF                                                 $14
         22        DO_ICALL                                         $15     
         23        ASSIGN                                                   !5, $15
   10    24        INIT_FCALL                                               'asort'
         25        SEND_REF                                                 !5
         26        DO_ICALL                                         $17     
         27      > RETURN                                                   $17
         28*       JMP                                                      ->30
   11    29    > > RETURN                                                   <false>
   12    30*     > RETURN                                                   null

End of function makecatlist

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.89 ms | 1402 KiB | 24 Q