3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $a = 1; public $b = 2; } class Bar { public $ref; } $foo = new Foo(); $bar = new Bar(); $bar->ref =& $foo->a; $bar->ref = '123'; var_dump($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SYctW
function name:  (null)
number of ops:  16
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   14     3        NEW                                              $5      'Bar'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   15     6        FETCH_OBJ_W                                      $9      !0, 'a'
          7        MAKE_REF                                         $10     $9
          8        ASSIGN_OBJ_REF                                           !1, 'ref'
          9        OP_DATA                                                  $10
   17    10        ASSIGN_OBJ                                               !1, 'ref'
         11        OP_DATA                                                  '123'
   19    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.16 ms | 1394 KiB | 15 Q