3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _prepareSkuParseRules(){ $structure = array(); $skuStructure = "[#name]-[Stoffgruppe]-[Groesse]-[:Ausfuehrung]-[:Matratze]"; $segments = explode("-", $skuStructure); foreach($segments as $segment){ $segmentInfo = array(); //check if segment is fixed if(!preg_match('/^\[(#)?([^\]#]*)\]$/', $segment, $matches)){ //is fixed value $segmentInfo["type"] = "set"; $segmentInfo["value"] = $matches[2]; }else{ if(isset($matches[1]) && !empty($matches[1]) && strcmp($matches[1], "#")==0){ $segmentInfo["type"] = "set"; $segmentInfo["namespace"] = "both"; //is registered variable name switch($matches[2]){ case "name": $segmentInfo["value"] = $this->_modelname; break; } }else{ if(isset($matches[1]) && !empty($matches[1]) && strcmp($matches[1], ":")==0){ $segmentInfo["namespace"] = "simple"; }else{ $segmentInfo["namespace"] = "both"; } $segmentInfo["type"] = "variable"; $segmentInfo["fieldname"] = $matches[2]; } } //check if segment is always $structure[] = $segmentInfo; } $this->_skuParseRules = $structure; } _prepareSkuParseRules();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P7vQO
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   INIT_FCALL                                               '_prepareskuparserules'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function _prepareskuparserules:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 79
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 79
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 76
Branch analysis from position: 76
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 23
2 jumps found. (Code = 46) Position 1 = 25, Position 2 = 28
Branch analysis from position: 25
2 jumps found. (Code = 46) Position 1 = 29, Position 2 = 36
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 52
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 45
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 76
Branch analysis from position: 76
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
Branch analysis from position: 52
2 jumps found. (Code = 46) Position 1 = 54, Position 2 = 57
Branch analysis from position: 54
2 jumps found. (Code = 46) Position 1 = 58, Position 2 = 65
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 66, Position 2 = 69
Branch analysis from position: 66
1 jumps found. (Code = 42) Position 1 = 71
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 69
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 65
Branch analysis from position: 57
Branch analysis from position: 36
Branch analysis from position: 28
Branch analysis from position: 79
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 79
filename:       /in/P7vQO
function name:  _prepareSkuParseRules
number of ops:  84
compiled vars:  !0 = $structure, !1 = $skuStructure, !2 = $segments, !3 = $segment, !4 = $segmentInfo, !5 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, '%5B%23name%5D-%5BStoffgruppe%5D-%5BGroesse%5D-%5B%3AAusfuehrung%5D-%5B%3AMatratze%5D'
    5     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '-'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !2, $8
    6     7      > FE_RESET_R                                       $10     !2, ->79
          8    > > FE_FETCH_R                                               $10, !3, ->79
    7     9    >   ASSIGN                                                   !4, <array>
    9    10        INIT_FCALL                                               'preg_match'
         11        SEND_VAL                                                 '%2F%5E%5C%5B%28%23%29%3F%28%5B%5E%5C%5D%23%5D%2A%29%5C%5D%24%2F'
         12        SEND_VAR                                                 !3
         13        SEND_REF                                                 !5
         14        DO_ICALL                                         $12     
         15        BOOL_NOT                                         ~13     $12
         16      > JMPZ                                                     ~13, ->23
   11    17    >   ASSIGN_DIM                                               !4, 'type'
         18        OP_DATA                                                  'set'
   12    19        FETCH_DIM_R                                      ~16     !5, 2
         20        ASSIGN_DIM                                               !4, 'value'
         21        OP_DATA                                                  ~16
         22      > JMP                                                      ->76
   14    23    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~17     !5, 1
         24      > JMPZ_EX                                          ~17     ~17, ->28
         25    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~18     !5, 1
         26        BOOL_NOT                                         ~19     ~18
         27        BOOL                                             ~17     ~19
         28    > > JMPZ_EX                                          ~17     ~17, ->36
         29    >   INIT_FCALL                                               'strcmp'
         30        FETCH_DIM_R                                      ~20     !5, 1
         31        SEND_VAL                                                 ~20
         32        SEND_VAL                                                 '%23'
         33        DO_ICALL                                         $21     
         34        IS_EQUAL                                         ~22     $21, 0
         35        BOOL                                             ~17     ~22
         36    > > JMPZ                                                     ~17, ->52
   15    37    >   ASSIGN_DIM                                               !4, 'type'
         38        OP_DATA                                                  'set'
   16    39        ASSIGN_DIM                                               !4, 'namespace'
         40        OP_DATA                                                  'both'
   18    41        FETCH_DIM_R                                      ~25     !5, 2
   19    42        CASE                                                     ~25, 'name'
         43      > JMPNZ                                                    ~26, ->45
         44    > > JMP                                                      ->50
         45    >   FETCH_THIS                                       $28     
         46        FETCH_OBJ_R                                      ~29     $28, '_modelname'
         47        ASSIGN_DIM                                               !4, 'value'
         48        OP_DATA                                                  ~29
         49      > JMP                                                      ->50
         50    >   FREE                                                     ~25
         51      > JMP                                                      ->76
   22    52    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~30     !5, 1
         53      > JMPZ_EX                                          ~30     ~30, ->57
         54    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~31     !5, 1
         55        BOOL_NOT                                         ~32     ~31
         56        BOOL                                             ~30     ~32
         57    > > JMPZ_EX                                          ~30     ~30, ->65
         58    >   INIT_FCALL                                               'strcmp'
         59        FETCH_DIM_R                                      ~33     !5, 1
         60        SEND_VAL                                                 ~33
         61        SEND_VAL                                                 '%3A'
         62        DO_ICALL                                         $34     
         63        IS_EQUAL                                         ~35     $34, 0
         64        BOOL                                             ~30     ~35
         65    > > JMPZ                                                     ~30, ->69
   23    66    >   ASSIGN_DIM                                               !4, 'namespace'
         67        OP_DATA                                                  'simple'
         68      > JMP                                                      ->71
   25    69    >   ASSIGN_DIM                                               !4, 'namespace'
         70        OP_DATA                                                  'both'
   27    71    >   ASSIGN_DIM                                               !4, 'type'
         72        OP_DATA                                                  'variable'
   28    73        FETCH_DIM_R                                      ~40     !5, 2
         74        ASSIGN_DIM                                               !4, 'fieldname'
         75        OP_DATA                                                  ~40
   32    76    >   ASSIGN_DIM                                               !0
         77        OP_DATA                                                  !4
    6    78      > JMP                                                      ->8
         79    >   FE_FREE                                                  $10
   34    80        FETCH_THIS                                       $42     
         81        ASSIGN_OBJ                                               $42, '_skuParseRules'
         82        OP_DATA                                                  !0
   35    83      > RETURN                                                   null

End of function _prepareskuparserules

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.43 ms | 1406 KiB | 20 Q