3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CFoo { public function foo() { $this->foo = 'foo'; } } class CBar { public function bar() { CFoo::foo(); } } $cBar = new CBar(); $cBar->bar(); echo $cBar->foo;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i11b9
function name:  (null)
number of ops:  8
compiled vars:  !0 = $cBar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'CBar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
   18     5        FETCH_OBJ_R                                      ~5      !0, 'foo'
          6        ECHO                                                     ~5
          7      > RETURN                                                   1

Class CFoo:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i11b9
function name:  foo
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN_OBJ                                               'foo'
          1        OP_DATA                                                  'foo'
    6     2      > RETURN                                                   null

End of function foo

End of class CFoo.

Class CBar:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i11b9
function name:  bar
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_STATIC_METHOD_CALL                                  'CFoo', 'foo'
          1        DO_FCALL                                      0          
   12     2      > RETURN                                                   null

End of function bar

End of class CBar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.48 ms | 1393 KiB | 13 Q