3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = 'es@set:col-md-8 col-lg-4 col-xl-6|info:f1|but:md fs@set:col-md-4 col-lg-8 col-xl-6|info:f4|but:md'; $arr = array(); foreach (explode("\n", $var) as $item) { list($key, $value) = explode('@', $item); foreach (explode('|', $value) as $val) { list ($k, $v) = explode(':', $val); $arr[$key][$k] = $v; }; } print_r($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 38
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 38
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 36
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 36
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 36
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/iirNu
function name:  (null)
number of ops:  43
compiled vars:  !0 = $var, !1 = $arr, !2 = $item, !3 = $key, !4 = $value, !5 = $val, !6 = $k, !7 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'es%40set%3Acol-md-8+col-lg-4+col-xl-6%7Cinfo%3Af1%7Cbut%3Amd%0Afs%40set%3Acol-md-4+col-lg-8+col-xl-6%7Cinfo%3Af4%7Cbut%3Amd'
    5     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%0A'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $10     
          6      > FE_RESET_R                                       $11     $10, ->38
          7    > > FE_FETCH_R                                               $11, !2, ->38
    7     8    >   INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%40'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $12     
         12        FETCH_LIST_R                                     $13     $12, 0
         13        ASSIGN                                                   !3, $13
         14        FETCH_LIST_R                                     $15     $12, 1
         15        ASSIGN                                                   !4, $15
         16        FREE                                                     $12
    8    17        INIT_FCALL                                               'explode'
         18        SEND_VAL                                                 '%7C'
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                         $17     
         21      > FE_RESET_R                                       $18     $17, ->36
         22    > > FE_FETCH_R                                               $18, !5, ->36
    9    23    >   INIT_FCALL                                               'explode'
         24        SEND_VAL                                                 '%3A'
         25        SEND_VAR                                                 !5
         26        DO_ICALL                                         $19     
         27        FETCH_LIST_R                                     $20     $19, 0
         28        ASSIGN                                                   !6, $20
         29        FETCH_LIST_R                                     $22     $19, 1
         30        ASSIGN                                                   !7, $22
         31        FREE                                                     $19
   10    32        FETCH_DIM_W                                      $24     !1, !3
         33        ASSIGN_DIM                                               $24, !6
         34        OP_DATA                                                  !7
    8    35      > JMP                                                      ->22
         36    >   FE_FREE                                                  $18
    6    37      > JMP                                                      ->7
         38    >   FE_FREE                                                  $11
   13    39        INIT_FCALL                                               'print_r'
         40        SEND_VAR                                                 !1
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.63 ms | 1016 KiB | 15 Q