3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bar = new Bar; $foo = new Foo; class Bar { public function __get($x) { global $foo; } } class Foo { public function __get($x) { global $bar; $bar->lol; } } $foo->blah--; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I8oZ6
function name:  (null)
number of ops:  8
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
   15     6        PRE_DEC_OBJ                                              !1, 'blah'
   16     7      > RETURN                                                   1

Class Bar:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I8oZ6
function name:  __get
number of ops:  3
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      > 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/I8oZ6
function name:  __get
number of ops:  5
compiled vars:  !0 = $x, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        BIND_GLOBAL                                              !1, 'bar'
   12     2        FETCH_OBJ_R                                      ~2      !1, 'lol'
          3        FREE                                                     ~2
   13     4      > RETURN                                                   null

End of function __get

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.27 ms | 1394 KiB | 13 Q