3v4l.org

run code in 300+ PHP versions simultaneously
<?php $o1 = array('foo' => '1', 'bar' => '2'); $o2 = array('foo' => '3', 'baz' => '4'); $o3 = array_intersect_key($o2, array_fill_keys(array('foo'), null)); print_r($o1 + $o3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VSP6f
function name:  (null)
number of ops:  16
compiled vars:  !0 = $o1, !1 = $o2, !2 = $o3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'array_intersect_key'
          3        SEND_VAR                                                 !1
          4        INIT_FCALL                                               'array_fill_keys'
          5        SEND_VAL                                                 <array>
          6        SEND_VAL                                                 null
          7        DO_ICALL                                         $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    5    11        INIT_FCALL                                               'print_r'
         12        ADD                                              ~8      !0, !2
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.72 ms | 1394 KiB | 19 Q