3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new stdClass; $obj->prop = 'init'; $ref =& $obj->prop; $clone = clone $obj; $clone->prop = 'changed'; var_dump($obj->prop);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Af8jv
function name:  (null)
number of ops:  16
compiled vars:  !0 = $obj, !1 = $ref, !2 = $clone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        ASSIGN_OBJ                                               !0, 'prop'
          4        OP_DATA                                                  'init'
    6     5        FETCH_OBJ_W                                      $7      !0, 'prop'
          6        ASSIGN_REF                                               !1, $7
    8     7        CLONE                                            ~9      !0
          8        ASSIGN                                                   !2, ~9
    9     9        ASSIGN_OBJ                                               !2, 'prop'
         10        OP_DATA                                                  'changed'
   11    11        INIT_FCALL                                               'var_dump'
         12        FETCH_OBJ_R                                      ~12     !0, 'prop'
         13        SEND_VAL                                                 ~12
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.66 ms | 1394 KiB | 15 Q