3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function echo() { echo static::getClassNameS(), "\n"; echo $this->getClassNameD(), "\n"; } public static function getClassNameS() { return 'A'; } public function getClassNameD() { return 'A'; } } class B extends A { public static function getClassNameS() { return 'A'; } public function getClassNameD() { return 'A'; } } (new B())->echo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n0DQm
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   NEW                                              $0      'B'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'echo'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class A:
Function echo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n0DQm
function name:  echo
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_STATIC_METHOD_CALL                                  'getClassNameS'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3        ECHO                                                     '%0A'
    7     4        INIT_METHOD_CALL                                         'getClassNameD'
          5        DO_FCALL                                      0  $1      
          6        ECHO                                                     $1
          7        ECHO                                                     '%0A'
    8     8      > RETURN                                                   null

End of function echo

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

End of function getclassnames

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

End of function getclassnamed

End of class A.

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

End of function getclassnames

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

End of function getclassnamed

Function echo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n0DQm
function name:  echo
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_STATIC_METHOD_CALL                                  'getClassNameS'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3        ECHO                                                     '%0A'
    7     4        INIT_METHOD_CALL                                         'getClassNameD'
          5        DO_FCALL                                      0  $1      
          6        ECHO                                                     $1
          7        ECHO                                                     '%0A'
    8     8      > RETURN                                                   null

End of function echo

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.99 ms | 1399 KiB | 13 Q