3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr=[1,2,3,4,6,7,8,10,11,12,13,14,16,17,18]; $block = array_chunk($arr,3); print_r($block); $blockNew[] = array_slice($arr, 0, 3, true); $blockNew[] = array_slice($arr, 4, 3, true); $blockNew[] = array_slice($arr, 7, 3, true); print_r($blockNew);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8E0Jp
function name:  (null)
number of ops:  37
compiled vars:  !0 = $arr, !1 = $block, !2 = $blockNew
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                                                     3
          4        DO_ICALL                                             $4      
          5        ASSIGN                                                       !1, $4
    5     6        INIT_FCALL                                                   'print_r'
          7        SEND_VAR                                                     !1
          8        DO_ICALL                                                     
    7     9        INIT_FCALL                                                   'array_slice'
         10        SEND_VAR                                                     !0
         11        SEND_VAL                                                     0
         12        SEND_VAL                                                     3
         13        SEND_VAL                                                     <true>
         14        DO_ICALL                                             $8      
         15        ASSIGN_DIM                                                   !2
         16        OP_DATA                                                      $8
    8    17        INIT_FCALL                                                   'array_slice'
         18        SEND_VAR                                                     !0
         19        SEND_VAL                                                     4
         20        SEND_VAL                                                     3
         21        SEND_VAL                                                     <true>
         22        DO_ICALL                                             $10     
         23        ASSIGN_DIM                                                   !2
         24        OP_DATA                                                      $10
    9    25        INIT_FCALL                                                   'array_slice'
         26        SEND_VAR                                                     !0
         27        SEND_VAL                                                     7
         28        SEND_VAL                                                     3
         29        SEND_VAL                                                     <true>
         30        DO_ICALL                                             $12     
         31        ASSIGN_DIM                                                   !2
         32        OP_DATA                                                      $12
   11    33        INIT_FCALL                                                   'print_r'
         34        SEND_VAR                                                     !2
         35        DO_ICALL                                                     
         36      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
179.58 ms | 2468 KiB | 16 Q