3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function get() { return 10; } public function show() { var_dump(self::get()); var_dump(static::get()); } } class B extends A { public static function get() { return 20; } } A::show(); echo "------\n"; B::show();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j6Ukt
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'show'
          1        DO_FCALL                                      0          
   23     2        ECHO                                                     '------%0A'
   24     3        INIT_STATIC_METHOD_CALL                                  'B', 'show'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function get

Function show:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j6Ukt
function name:  show
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'get'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
   11     5        INIT_FCALL                                               'var_dump'
          6        INIT_STATIC_METHOD_CALL                                  'get'
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
   12    10      > RETURN                                                   null

End of function show

End of class A.

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

End of function get

Function show:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j6Ukt
function name:  show
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'get'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
   11     5        INIT_FCALL                                               'var_dump'
          6        INIT_STATIC_METHOD_CALL                                  'get'
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
   12    10      > RETURN                                                   null

End of function show

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.33 ms | 1400 KiB | 15 Q