3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.16 ms | 1395 KiB | 17 Q