3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public static function test() { var_dump(get_called_class()); // var_dump(get_deb // ug(true)); var_dump(debug_backtrace(true)); } } class bar extends foo { } foo::test(); bar::test(); class_alias('bar', 'baz'); baz::test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OvCWJ
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'foo', 'test'
          1        DO_FCALL                                      0          
   18     2        INIT_STATIC_METHOD_CALL                                  'bar', 'test'
          3        DO_FCALL                                      0          
   19     4        INIT_FCALL                                               'class_alias'
          5        SEND_VAL                                                 'bar'
          6        SEND_VAL                                                 'baz'
          7        DO_ICALL                                                 
   20     8        INIT_STATIC_METHOD_CALL                                  'baz', 'test'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OvCWJ
function name:  test
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        GET_CALLED_CLASS                                 ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    9     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'debug_backtrace'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
   10    10      > RETURN                                                   null

End of function test

End of class foo.

Class bar:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OvCWJ
function name:  test
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        GET_CALLED_CLASS                                 ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    9     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'debug_backtrace'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
   10    10      > RETURN                                                   null

End of function test

End of class bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
208.56 ms | 1401 KiB | 19 Q