3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.32 ms | 1011 KiB | 15 Q