3v4l.org

run code in 500+ PHP versions simultaneously
<?php $x = 4; $y = &$x; $a = [1,2,$y]; $b = $a; $b[2] = 40; var_dump($a); var_dump($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W9PIR
function name:  (null)
number of ops:  16
compiled vars:  !0 = $x, !1 = $y, !2 = $a, !3 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 4
    5     1        ASSIGN_REF                                                   !1, !0
    7     2        INIT_ARRAY                                           ~6      1
          3        ADD_ARRAY_ELEMENT                                    ~6      2
          4        ADD_ARRAY_ELEMENT                                    ~6      !1
          5        ASSIGN                                                       !2, ~6
    9     6        ASSIGN                                                       !3, !2
   10     7        ASSIGN_DIM                                                   !3, 2
          8        OP_DATA                                                      40
   12     9        INIT_FCALL                                                   'var_dump'
         10        SEND_VAR                                                     !2
         11        DO_ICALL                                                     
   13    12        INIT_FCALL                                                   'var_dump'
         13        SEND_VAR                                                     !3
         14        DO_ICALL                                                     
         15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.96 ms | 2118 KiB | 14 Q