3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = 0; $a = array(&$x); $c =& $a; $b = $a; $x = 2; unset($x); $b[0]++; $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/fKVke
function name:  (null)
number of ops:  17
compiled vars:  !0 = $x, !1 = $a, !2 = $c, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        INIT_ARRAY                                       ~5      !0
          2        ASSIGN                                                   !1, ~5
    4     3        ASSIGN_REF                                               !2, !1
    5     4        ASSIGN                                                   !3, !1
    6     5        ASSIGN                                                   !0, 2
    7     6        UNSET_CV                                                 !0
    8     7        FETCH_DIM_RW                                     $10     !3, 0
          8        PRE_INC                                                  $10
    9     9        FETCH_DIM_RW                                     $12     !3, 0
         10        PRE_INC                                                  $12
   10    11        FETCH_DIM_R                                      ~14     !1, 0
         12        ECHO                                                     ~14
         13        ECHO                                                     '+'
         14        FETCH_DIM_R                                      ~15     !3, 0
         15        ECHO                                                     ~15
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.05 ms | 1384 KiB | 13 Q