3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $foo; } $message = "boom"; $f = new Foo(); $f->foo = &$f; $f2 = clone $f; $f->foo = "chakalaka"; echo $f2->foo;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1PHp1
function name:  (null)
number of ops:  13
compiled vars:  !0 = $message, !1 = $f, !2 = $f2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 'boom'
    9     1        NEW                                              $4      'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   10     4        ASSIGN_OBJ_REF                                           !1, 'foo'
          5        OP_DATA                                                  !1
   12     6        CLONE                                            ~8      !1
          7        ASSIGN                                                   !2, ~8
   13     8        ASSIGN_OBJ                                               !1, 'foo'
          9        OP_DATA                                                  'chakalaka'
   15    10        FETCH_OBJ_R                                      ~11     !2, 'foo'
         11        ECHO                                                     ~11
   16    12      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.83 ms | 993 KiB | 13 Q