3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169 ms | 1395 KiB | 19 Q