3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = 0; var_dump($x); $a = array(&$x); var_dump($a); $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/bTfZZ
function name:  (null)
number of ops:  22
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_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4        INIT_ARRAY                                       ~5      !0
          5        ASSIGN                                                   !1, ~5
    6     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    7     9        ASSIGN                                                   !2, !1
    8    10        ASSIGN                                                   !0, 2
    9    11        UNSET_CV                                                 !0
   10    12        FETCH_DIM_RW                                     $10     !2, 1
         13        PRE_INC                                                  $10
   11    14        FETCH_DIM_RW                                     $12     !2, 0
         15        PRE_INC                                                  $12
   12    16        FETCH_DIM_R                                      ~14     !1, 0
         17        ECHO                                                     ~14
         18        ECHO                                                     '+'
         19        FETCH_DIM_R                                      ~15     !2, 0
         20        ECHO                                                     ~15
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.63 ms | 1395 KiB | 15 Q