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)); 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/0sdbm
function name:  (null)
number of ops:  31
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                                               'array_replace_recursive'
         17        SEND_VAR                                                 !2
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
   10    20        INIT_FCALL                                               'var_dump'
         21        INIT_FCALL                                               'current'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $14     
         24        SEND_VAR                                                 $14
         25        INIT_FCALL                                               'current'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $15     
         28        SEND_VAR                                                 $15
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.17 ms | 1395 KiB | 19 Q