3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(1, 2, 3, 4); $chunk = array_chunk($arr, 2); $arr = array_shift($chunk); foreach ($chunk as $item) { print_r($item); } print_r($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/FIlIZ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $arr, !1 = $chunk, !2 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_chunk'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 2
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        INIT_FCALL                                               'array_shift'
          7        SEND_REF                                                 !1
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !0, $6
    6    10      > FE_RESET_R                                       $8      !1, ->16
         11    > > FE_FETCH_R                                               $8, !2, ->16
    7    12    >   INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
    6    15      > JMP                                                      ->11
         16    >   FE_FREE                                                  $8
    9    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.18 ms | 1399 KiB | 19 Q