3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parseCss($rawText) { $matches = array(); $selections = preg_match_all('/\/\* customize_(.+?) \*\/(.+?)\/\* customize_\1 \*\//m',$rawText,$matches); if (!$selections) return array(); $realMatches = array(); foreach($matches[1] as $key => $val) { $elements = array(); $realMatches[$val] = array(); preg_match_all('/([^ \t\n;]+?):(.+?);/',$matches[2][$key],$elements); foreach ($elements[1] as $k => $v) { $realMatches[$val][] = array($v,$elements[2][$k]); } } return $realMatches; } print_r(parseCss(' #page #header #logo a { /* customize_header_logo */ color: #ffffff; font-family:Arial; /* customize_header_logo */ /* customize_header_logo_text */ font: normal bold 32px Arial; /* customize_header_logo_text */ text-decoration:none; }'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/osEip
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'parsecss'
          2        SEND_VAL                                                 '%0A%23page+%23header+%23logo+a+%7B%0A%2F%2A+customize_header_logo+%2A%2F+color%3A+%23ffffff%3B+font-family%3AArial%3B+%2F%2A+customize_header_logo+%2A%2F%0A%09%2F%2A+customize_header_logo_text+%2A%2F+font%3A+normal+bold+32px+Arial%3B+%2F%2A+customize_header_logo_text+%2A%2F%0A%09text-decoration%3Anone%3B%0A%7D'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   26     6      > RETURN                                                   1

Function parsecss:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 40
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 40
Branch analysis from position: 15
2 jumps found. (Code = 77) Position 1 = 28, Position 2 = 38
Branch analysis from position: 28
2 jumps found. (Code = 78) Position 1 = 29, Position 2 = 38
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 38
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
filename:       /in/osEip
function name:  parseCss
number of ops:  43
compiled vars:  !0 = $rawText, !1 = $matches, !2 = $selections, !3 = $realMatches, !4 = $val, !5 = $key, !6 = $elements, !7 = $v, !8 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%5C%2F%5C%2A+customize_%28.%2B%3F%29+%5C%2A%5C%2F%28.%2B%3F%29%5C%2F%5C%2A+customize_%5C1+%5C%2A%5C%2F%2Fm'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                         $10     
          7        ASSIGN                                                   !2, $10
    6     8        BOOL_NOT                                         ~12     !2
          9      > JMPZ                                                     ~12, ->11
         10    > > RETURN                                                   <array>
    7    11    >   ASSIGN                                                   !3, <array>
    8    12        FETCH_DIM_R                                      ~14     !1, 1
         13      > FE_RESET_R                                       $15     ~14, ->40
         14    > > FE_FETCH_R                                       ~16     $15, !4, ->40
         15    >   ASSIGN                                                   !5, ~16
    9    16        ASSIGN                                                   !6, <array>
   10    17        ASSIGN_DIM                                               !3, !4
         18        OP_DATA                                                  <array>
   11    19        INIT_FCALL                                               'preg_match_all'
         20        SEND_VAL                                                 '%2F%28%5B%5E+%5Ct%5Cn%3B%5D%2B%3F%29%3A%28.%2B%3F%29%3B%2F'
         21        FETCH_DIM_R                                      ~20     !1, 2
         22        FETCH_DIM_R                                      ~21     ~20, !5
         23        SEND_VAL                                                 ~21
         24        SEND_REF                                                 !6
         25        DO_ICALL                                                 
   13    26        FETCH_DIM_R                                      ~23     !6, 1
         27      > FE_RESET_R                                       $24     ~23, ->38
         28    > > FE_FETCH_R                                       ~25     $24, !7, ->38
         29    >   ASSIGN                                                   !8, ~25
   14    30        INIT_ARRAY                                       ~29     !7
         31        FETCH_DIM_R                                      ~30     !6, 2
         32        FETCH_DIM_R                                      ~31     ~30, !8
         33        ADD_ARRAY_ELEMENT                                ~29     ~31
         34        FETCH_DIM_W                                      $27     !3, !4
         35        ASSIGN_DIM                                               $27
         36        OP_DATA                                                  ~29
   13    37      > JMP                                                      ->28
         38    >   FE_FREE                                                  $24
    8    39      > JMP                                                      ->14
         40    >   FE_FREE                                                  $15
   17    41      > RETURN                                                   !3
   18    42*     > RETURN                                                   null

End of function parsecss

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.57 ms | 1403 KiB | 18 Q