3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function foo() { var_dump(get_called_class()); } } class B extends A {} $r = new ReflectionClass('B'); $m = $r->getMethod('foo'); $m->invokeArgs(null, array());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fq1ds
function name:  (null)
number of ops:  13
compiled vars:  !0 = $r, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'B'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   12     4        INIT_METHOD_CALL                                         !0, 'getMethod'
          5        SEND_VAL_EX                                              'foo'
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
   13     8        INIT_METHOD_CALL                                         !1, 'invokeArgs'
          9        SEND_VAL_EX                                              null
         10        SEND_VAL_EX                                              <array>
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

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

End of function foo

End of class A.

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

End of function foo

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.15 ms | 1396 KiB | 15 Q