3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); class A { public function foo() { static::bar(); } public function bar() { echo "A::bar"; } } class B { public function something() { A::foo(); } public function bar() { echo "B::bar"; } } $b = new B; $b->something();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vsG1B
function name:  (null)
number of ops:  9
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
   23     3        NEW                                              $2      'B'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   25     6        INIT_METHOD_CALL                                         !0, 'something'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vsG1B
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'A%3A%3Abar'
   11     1      > RETURN                                                   null

End of function bar

End of class A.

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

End of function something

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vsG1B
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ECHO                                                     'B%3A%3Abar'
   20     1      > RETURN                                                   null

End of function bar

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.23 ms | 1396 KiB | 15 Q