3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function a1() { static::foo(); } static public function a2() { static::foo(); } static public function foo() { echo 'A'; } } class B { public function b1() { A::a2(); } static public function b2() { A::a2(); } static public function foo() { echo 'B'; } } B::b2();//A $b = new B; $b->b1();//B $b->b2();//A
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eOHok
function name:  (null)
number of ops:  10
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'b2'
          1        DO_FCALL                                      0          
   41     2        NEW                                              $2      'B'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   42     5        INIT_METHOD_CALL                                         !0, 'b1'
          6        DO_FCALL                                      0          
   43     7        INIT_METHOD_CALL                                         !0, 'b2'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function a1

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

End of function a2

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

End of function foo

End of class A.

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

End of function b1

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

End of function b2

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

End of function foo

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.84 ms | 1390 KiB | 13 Q