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"]); echo $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/K4f2s
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'makecatlist'
          1        SEND_VAL                                                 <array>
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   16     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 = 21, Position 2 = 28
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K4f2s
function name:  makeCatList
number of ops:  30
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        FETCH_DIM_R                                      ~11     !0, 'string'
         13        ECHO                                                     ~11
    8    14        INIT_FCALL                                               'preg_match_all'
         15        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'
    9    16        FETCH_DIM_R                                      ~12     !0, 'string'
         17        SEND_VAL                                                 ~12
         18        SEND_REF                                                 !4
         19        DO_ICALL                                         $13     
         20      > JMPZ                                                     $13, ->28
   10    21    >   INIT_FCALL                                               'sort'
         22        FETCH_DIM_W                                      $14     !4, 0
         23        SEND_REF                                                 $14
         24        DO_ICALL                                                 
   11    25        FETCH_DIM_R                                      ~16     !4, 0
         26      > RETURN                                                   ~16
         27*       JMP                                                      ->29
   12    28    > > RETURN                                                   <false>
   13    29*     > RETURN                                                   null

End of function makecatlist

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
230.65 ms | 1407 KiB | 22 Q