3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("1", "2", "3", "4", "5","6","7","8"); $output1 = array_slice($input,0,4); $output2 = array_slice($input,4); print_r($output1); print_r($output2); $input_array = array('a', 'b', 'c', 'd', 'e'); print_r(array_chunk($input_array, 4));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Se5hE
function name:  (null)
number of ops:  27
compiled vars:  !0 = $input, !1 = $output1, !2 = $output2, !3 = $input_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_slice'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 4
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    5     7        INIT_FCALL                                               'array_slice'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 4
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
    7    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
    8    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
   10    18        ASSIGN                                                   !3, <array>
   11    19        INIT_FCALL                                               'print_r'
         20        INIT_FCALL                                               'array_chunk'
         21        SEND_VAR                                                 !3
         22        SEND_VAL                                                 4
         23        DO_ICALL                                         $12     
         24        SEND_VAR                                                 $12
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.2 ms | 1395 KiB | 19 Q