3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; $b = [&$a]; $c = $b; unset($a); // <-- $b[0] = 2; echo "$b[0] $c[0]"; // 2 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sI5S0
function name:  (null)
number of ops:  14
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        UNSET_CV                                                 !0
    7     5        ASSIGN_DIM                                               !1, 0
          6        OP_DATA                                                  2
    8     7        FETCH_DIM_R                                      ~8      !1, 0
          8        ROPE_INIT                                     3  ~11     ~8
          9        ROPE_ADD                                      1  ~11     ~11, '+'
         10        FETCH_DIM_R                                      ~9      !2, 0
         11        ROPE_END                                      2  ~10     ~11, ~9
         12        ECHO                                                     ~10
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.13 ms | 1441 KiB | 13 Q