3v4l.org

run code in 300+ PHP versions simultaneously
<?php $example = array(1,2,3,4,5,6,7,8,9); $offset = 2; $length = 5; $newArray = array_slice($example, $offset, $length); var_dump($newArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cRHs6
function name:  (null)
number of ops:  13
compiled vars:  !0 = $example, !1 = $offset, !2 = $length, !3 = $newArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 2
    4     2        ASSIGN                                                   !2, 5
    5     3        INIT_FCALL                                               'array_slice'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
    7     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.17 ms | 1394 KiB | 17 Q