3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.49 ms | 1399 KiB | 15 Q