3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.74 ms | 1392 KiB | 13 Q