3v4l.org

run code in 300+ PHP versions simultaneously
<?php function printCalledClass() { echo(get_called_class() . "\n"); } abstract class Foo { public static function printMe() { printCalledClass(); } } class Bar extends Foo { } Bar::printMe();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6G0MT
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'Bar', 'printMe'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function printcalledclass:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6G0MT
function name:  printCalledClass
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   GET_CALLED_CLASS                                 ~0      
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    5     3      > RETURN                                                   null

End of function printcalledclass

Class Foo:
Function printme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6G0MT
function name:  printMe
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'printcalledclass'
          1        DO_FCALL                                      0          
   12     2      > RETURN                                                   null

End of function printme

End of class Foo.

Class Bar:
Function printme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6G0MT
function name:  printMe
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'printcalledclass'
          1        DO_FCALL                                      0          
   12     2      > RETURN                                                   null

End of function printme

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.81 ms | 1398 KiB | 15 Q