3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '{xxx} some text 1{*|, some text 2 {xxx}}{*|, some text 3 {xxx}}{*|, 1 {xxx} some text 4}{*|, 1 {xxx} some text 5}'; $values = explode('{*|,', $str); $newArray = []; for ($i = 1; $i < count($values); $i++) { $newArray[$values[0]][$i - 1] = $values[$i]; } var_export($newArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 9
Branch analysis from position: 19
Branch analysis from position: 9
filename:       /in/9JgGg
function name:  (null)
number of ops:  23
compiled vars:  !0 = $str, !1 = $values, !2 = $newArray, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7Bxxx%7D+some+text+1%7B%2A%7C%2C+some+text+2+%7Bxxx%7D%7D%7B%2A%7C%2C+some+text+3+%7Bxxx%7D%7D%7B%2A%7C%2C+1+%7Bxxx%7D+some+text+4%7D%7B%2A%7C%2C+1+%7Bxxx%7D+some+text+5%7D'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%7B%2A%7C%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    7     6        ASSIGN                                                   !2, <array>
    8     7        ASSIGN                                                   !3, 1
          8      > JMP                                                      ->16
    9     9    >   FETCH_DIM_R                                      ~9      !1, 0
         10        SUB                                              ~11     !3, 1
         11        FETCH_DIM_R                                      ~13     !1, !3
         12        FETCH_DIM_W                                      $10     !2, ~9
         13        ASSIGN_DIM                                               $10, ~11
         14        OP_DATA                                                  ~13
    8    15        PRE_INC                                                  !3
         16    >   COUNT                                            ~15     !1
         17        IS_SMALLER                                               !3, ~15
         18      > JMPNZ                                                    ~16, ->9
   12    19    >   INIT_FCALL                                               'var_export'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.62 ms | 1406 KiB | 17 Q