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)){ sort($mCats[0]); return $mCats[0]; } else return false; } $a = makeCatList(array("string"=>"dсАв1beс1edeTr")); print_r($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QvRdq
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'makecatlist'
          1        SEND_VAL                                                 <array>
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   15     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function makecatlist:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QvRdq
function name:  makeCatList
number of ops:  28
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, ->26
    9    19    >   INIT_FCALL                                               'sort'
         20        FETCH_DIM_W                                      $13     !4, 0
         21        SEND_REF                                                 $13
         22        DO_ICALL                                                 
   10    23        FETCH_DIM_R                                      ~15     !4, 0
         24      > RETURN                                                   ~15
         25*       JMP                                                      ->27
   11    26    > > RETURN                                                   <false>
   12    27*     > RETURN                                                   null

End of function makecatlist

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.04 ms | 1398 KiB | 22 Q