3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.48 ms | 1395 KiB | 19 Q