3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [1=>[[100]], 2=>[[200]]]; $ref = &$arr[1]; $empty = 0; $ref[] = array_merge($empty, [101]); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KafKO
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arr, !1 = $ref, !2 = $empty
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        FETCH_DIM_W                                      $4      !0, 1
          2        ASSIGN_REF                                               !1, $4
    5     3        ASSIGN                                                   !2, 0
    6     4        INIT_FCALL                                               'array_merge'
          5        SEND_VAR                                                 !2
          6        SEND_VAL                                                 <array>
          7        DO_ICALL                                         $8      
          8        ASSIGN_DIM                                               !1
          9        OP_DATA                                                  $8
    7    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.48 ms | 1394 KiB | 17 Q