3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = ['a', 'foo' => 'b']; var_dump(array_splice($arr, 0, 2)); $arr = ['a', 'b']; var_dump(array_splice($arr, 0, 2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ggnQB
function name:  (null)
number of ops:  19
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                                                     0
          5        SEND_VAL                                                     2
          6        DO_ICALL                                             $2      
          7        SEND_VAR                                                     $2
          8        DO_ICALL                                                     
    6     9        ASSIGN                                                       !0, <array>
    7    10        INIT_FCALL                                                   'var_dump'
         11        INIT_FCALL                                                   'array_splice'
         12        SEND_REF                                                     !0
         13        SEND_VAL                                                     0
         14        SEND_VAL                                                     2
         15        DO_ICALL                                             $5      
         16        SEND_VAR                                                     $5
         17        DO_ICALL                                                     
         18      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.22 ms | 1455 KiB | 15 Q