3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new stdClass; $ref = 42; $obj->ref =& $ref; $clone = clone $obj; $clone->ref = 24; var_dump($obj, $clone);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c4iov
function name:  (null)
number of ops:  15
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                                                   !1, 42
    5     4        ASSIGN_OBJ_REF                                           !0, 'ref'
          5        OP_DATA                                                  !1
    6     6        CLONE                                            ~8      !0
          7        ASSIGN                                                   !2, ~8
    7     8        ASSIGN_OBJ                                               !2, 'ref'
          9        OP_DATA                                                  24
    8    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.25 ms | 1394 KiB | 15 Q