3v4l.org

run code in 500+ PHP versions simultaneously
<?php abstract class P { static public function test() { echo get_called_class(); } } class C extends P { public static function runStatic() { P::test(); call_user_func('P::test'); call_user_func(array('P', 'test')); } public function run() { P::test(); call_user_func('P::test'); call_user_func(array('P', 'test')); } } C::runStatic(); $c = new C(); $c->run();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hscB8
function name:  (null)
number of ops:  8
compiled vars:  !0 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   INIT_STATIC_METHOD_CALL                                      'C', 'runStatic'
          1        DO_FCALL                                          0          
   21     2        NEW                                                  $2      'C'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $2
   22     5        INIT_METHOD_CALL                                             !0, 'run'
          6        DO_FCALL                                          0          
          7      > RETURN                                                       1

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

End of function test

End of class P.

Class C:
Function runstatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hscB8
function name:  runStatic
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                      'P', 'test'
          1        DO_FCALL                                          0          
   11     2        INIT_USER_CALL                                    0          'call_user_func', 'P%3A%3Atest'
          3        DO_FCALL                                          0          
   12     4        INIT_USER_CALL                                    0          'call_user_func', <array>
          5        DO_FCALL                                          0          
   13     6      > RETURN                                                       null

End of function runstatic

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hscB8
function name:  run
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                      'P', 'test'
          1        DO_FCALL                                          0          
   16     2        INIT_USER_CALL                                    0          'call_user_func', 'P%3A%3Atest'
          3        DO_FCALL                                          0          
   17     4        INIT_USER_CALL                                    0          'call_user_func', <array>
          5        DO_FCALL                                          0          
   18     6      > RETURN                                                       null

End of function run

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

End of function test

End of class C.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.83 ms | 2096 KiB | 13 Q