3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public static function a() { print get_class(); print get_called_class(); } } class foo2 extends foo { } foo::a(); foo2::a();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0gIDR
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'foo', 'a'
          1        DO_FCALL                                      0          
   17     2        INIT_STATIC_METHOD_CALL                                  'foo2', 'a'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class foo:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0gIDR
function name:  a
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   GET_CLASS                                        ~0      
          1        ECHO                                                     ~0
    7     2        GET_CALLED_CLASS                                 ~1      
          3        ECHO                                                     ~1
    8     4      > RETURN                                                   null

End of function a

End of class foo.

Class foo2:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0gIDR
function name:  a
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   GET_CLASS                                        ~0      
          1        ECHO                                                     ~0
    7     2        GET_CALLED_CLASS                                 ~1      
          3        ECHO                                                     ~1
    8     4      > RETURN                                                   null

End of function a

End of class foo2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
354.62 ms | 1398 KiB | 14 Q