3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.61 ms | 1396 KiB | 19 Q