3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("a", "b", "c", "d", "e"); $output1 = array_slice($input, 0,4); $output2 = array_slice($input, 4); // note the differences in the array keys print_r(array_slice($input,0,4)); print_r($output1); print_r($output2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/biilZ
function name:  (null)
number of ops:  27
compiled vars:  !0 = $input, !1 = $output1, !2 = $output2
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                                         $4      
          6        ASSIGN                                                   !1, $4
    5     7        INIT_FCALL                                               'array_slice'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 4
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !2, $6
    8    12        INIT_FCALL                                               'print_r'
         13        INIT_FCALL                                               'array_slice'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 4
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                                 
   11    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
   12    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.77 ms | 1395 KiB | 17 Q