3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = array( "a", "b", "c; d; e", "f", "g", "h; i; j", "k" ); foreach($arr as $key => $val){ $temp = explode("; ", $val); $arr[$key] = $temp[0]; $arr = array_merge($arr, array_slice($temp,1)); } var_dump($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 22
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 22
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/epIY9
function name:  (null)
number of ops:  27
compiled vars:  !0 = $arr, !1 = $val, !2 = $key, !3 = $temp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   14     1      > FE_RESET_R                                           $5      !0, ->22
          2    > > FE_FETCH_R                                           ~6      $5, !1, ->22
          3    >   ASSIGN                                                       !2, ~6
   15     4        INIT_FCALL                                                   'explode'
          5        SEND_VAL                                                     '%3B+'
          6        SEND_VAR                                                     !1
          7        DO_ICALL                                             $8      
          8        ASSIGN                                                       !3, $8
   16     9        FETCH_DIM_R                                          ~11     !3, 0
         10        ASSIGN_DIM                                                   !0, !2
         11        OP_DATA                                                      ~11
   17    12        INIT_FCALL                                                   'array_merge'
         13        SEND_VAR                                                     !0
         14        INIT_FCALL                                                   'array_slice'
         15        SEND_VAR                                                     !3
         16        SEND_VAL                                                     1
         17        DO_ICALL                                             $12     
         18        SEND_VAR                                                     $12
         19        DO_ICALL                                             $13     
         20        ASSIGN                                                       !0, $13
   14    21      > JMP                                                          ->2
         22    >   FE_FREE                                                      $5
   20    23        INIT_FCALL                                                   'var_dump'
         24        SEND_VAR                                                     !0
         25        DO_ICALL                                                     
         26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.39 ms | 2207 KiB | 17 Q