3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '33|ts|6|ank|5|ist|4|bjk|2|fb|1|gs'; $explode = explode('|', $str); $parcala = array_chunk($explode, 2); $arr = []; foreach ($parcala as $item) { $arr[$item[0]] = $item[1]; } print_r($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/cZB7F
function name:  (null)
number of ops:  24
compiled vars:  !0 = $str, !1 = $explode, !2 = $parcala, !3 = $arr, !4 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '33%7Cts%7C6%7Cank%7C5%7Cist%7C4%7Cbjk%7C2%7Cfb%7C1%7Cgs'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%7C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    5     6        INIT_FCALL                                               'array_chunk'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 2
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
    6    11        ASSIGN                                                   !3, <array>
    7    12      > FE_RESET_R                                       $11     !2, ->19
         13    > > FE_FETCH_R                                               $11, !4, ->19
    8    14    >   FETCH_DIM_R                                      ~12     !4, 0
         15        FETCH_DIM_R                                      ~14     !4, 1
         16        ASSIGN_DIM                                               !3, ~12
         17        OP_DATA                                                  ~14
    7    18      > JMP                                                      ->13
         19    >   FE_FREE                                                  $11
   10    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.82 ms | 1447 KiB | 16 Q