3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bar = new Bar; $foo = new Foo; class Bar { public function __get($x) { global $foo; $foo->asd++; } } class Foo { public function __get($x) { global $bar; $bar->lol++; } } $foo->blah++; echo "Done\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XgBZs
function name:  (null)
number of ops:  9
compiled vars:  !0 = $bar, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    3     3        NEW                                              $5      'Foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   16     6        PRE_INC_OBJ                                              !1, 'blah'
   17     7        ECHO                                                     'Done%0A'
          8      > RETURN                                                   1

Class Bar:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XgBZs
function name:  __get
number of ops:  4
compiled vars:  !0 = $x, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        BIND_GLOBAL                                              !1, 'foo'
    7     2        PRE_INC_OBJ                                              !1, 'asd'
    8     3      > RETURN                                                   null

End of function __get

End of class Bar.

Class Foo:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XgBZs
function name:  __get
number of ops:  4
compiled vars:  !0 = $x, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        BIND_GLOBAL                                              !1, 'bar'
   13     2        PRE_INC_OBJ                                              !1, 'lol'
   14     3      > RETURN                                                   null

End of function __get

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.92 ms | 1394 KiB | 13 Q