3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one = [1]; $two = [42]; $arr1 = ['k' => &$one]; $arr2 = ['k' => &$two]; var_dump(current($one), current($two)); print_r(array_replace_recursive($arr1, $arr2)); var_dump(current($one), current($two));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hKb0f
function name:  (null)
number of ops:  34
compiled vars:  !0 = $one, !1 = $two, !2 = $arr1, !3 = $arr2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_ARRAY                                       ~6      !0, 'k'
          3        ASSIGN                                                   !2, ~6
    7     4        INIT_ARRAY                                       ~8      !1, 'k'
          5        ASSIGN                                                   !3, ~8
    8     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'current'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $10     
         10        SEND_VAR                                                 $10
         11        INIT_FCALL                                               'current'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $11     
         14        SEND_VAR                                                 $11
         15        DO_ICALL                                                 
    9    16        INIT_FCALL                                               'print_r'
         17        INIT_FCALL                                               'array_replace_recursive'
         18        SEND_VAR                                                 !2
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                         $13     
         21        SEND_VAR                                                 $13
         22        DO_ICALL                                                 
   10    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'current'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $15     
         27        SEND_VAR                                                 $15
         28        INIT_FCALL                                               'current'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $16     
         31        SEND_VAR                                                 $16
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.53 ms | 1396 KiB | 21 Q