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/D6rbB
function name:  (null)
number of ops:  9
compiled vars:  !0 = $bar, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        NEW                                              $5      'Foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   17     6        PRE_INC_OBJ                                              !1, 'blah'
   18     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/D6rbB
function name:  __get
number of ops:  4
compiled vars:  !0 = $x, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        BIND_GLOBAL                                              !1, 'foo'
    8     2        PRE_INC_OBJ                                              !1, 'asd'
    9     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/D6rbB
function name:  __get
number of ops:  4
compiled vars:  !0 = $x, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        BIND_GLOBAL                                              !1, 'bar'
   14     2        PRE_INC_OBJ                                              !1, 'lol'
   15     3      > RETURN                                                   null

End of function __get

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.29 ms | 1394 KiB | 13 Q