3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = 1; $b = [&$a]; $c = $b; $b[0] = 2; echo "$b[0] $c[0]"; // 2 2
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZRGBQ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 1
    4     1        INIT_ARRAY                                           ~4      !0
          2        ASSIGN                                                       !1, ~4
    5     3        ASSIGN                                                       !2, !1
    6     4        ASSIGN_DIM                                                   !1, 0
          5        OP_DATA                                                      2
    7     6        FETCH_DIM_R                                          ~8      !1, 0
          7        ROPE_INIT                                         3  ~11     ~8
          8        ROPE_ADD                                          1  ~11     ~11, '+'
          9        FETCH_DIM_R                                          ~9      !2, 0
         10        ROPE_END                                          2  ~10     ~11, ~9
         11        ECHO                                                         ~10
         12      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
226.22 ms | 1983 KiB | 13 Q