3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.54 ms | 1394 KiB | 15 Q