3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Class1 { function foo(){ } } class Class2 { function bar(){ Class1::foo(); } } $class2 = new Class2(); $class2->bar(); echo "And the error message"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/moFWk
function name:  (null)
number of ops:  7
compiled vars:  !0 = $class2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Class2'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
   20     5        ECHO                                                     'And+the+error+message'
   22     6      > RETURN                                                   1

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

End of function foo

End of class Class1.

Class Class2:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/moFWk
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                                  'Class1', 'foo'
          1        DO_FCALL                                      0          
   12     2      > RETURN                                                   null

End of function bar

End of class Class2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.98 ms | 1393 KiB | 13 Q