3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.72 ms | 1395 KiB | 17 Q