3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public static function a() { print get_class() . "\n"; print get_called_class() . "\n"; } } 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/E6Cjk
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/E6Cjk
function name:  a
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   GET_CLASS                                        ~0      
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    7     3        GET_CALLED_CLASS                                 ~2      
          4        CONCAT                                           ~3      ~2, '%0A'
          5        ECHO                                                     ~3
    8     6      > 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/E6Cjk
function name:  a
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   GET_CLASS                                        ~0      
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    7     3        GET_CALLED_CLASS                                 ~2      
          4        CONCAT                                           ~3      ~2, '%0A'
          5        ECHO                                                     ~3
    8     6      > RETURN                                                   null

End of function a

End of class foo2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.09 ms | 1394 KiB | 13 Q