3v4l.org

run code in 500+ PHP versions simultaneously
<?php $x = 0; $a = array(&$x); $b = $a; $x = 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/qNiGW
function name:  (null)
number of ops:  16
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
    7     5        UNSET_CV                                                     !0
    8     6        FETCH_DIM_RW                                         $8      !2, 1
          7        PRE_INC                                                      $8
    9     8        FETCH_DIM_RW                                         $10     !2, 0
          9        PRE_INC                                                      $10
   10    10        FETCH_DIM_R                                          ~12     !1, 0
         11        ECHO                                                         ~12
         12        ECHO                                                         '+'
         13        FETCH_DIM_R                                          ~13     !2, 0
         14        ECHO                                                         ~13
         15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
191.35 ms | 3114 KiB | 13 Q