3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface I1 { public static function foo($bar); } interface I2 { public static function foo($bar); } class A implements I1, I2 { // which interface should be inherited here? public static function foo($bar) {} } var_dump((new ReflectionMethod('A::foo'))->getPrototype());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s0juS
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                                'a'
   16     1        INIT_FCALL                                                   'var_dump'
          2        NEW                                                  $0      'ReflectionMethod'
          3        SEND_VAL_EX                                                  'A%3A%3Afoo'
          4        DO_FCALL                                          0          
          5        INIT_METHOD_CALL                                             $0, 'getPrototype'
          6        DO_FCALL                                          0  $2      
          7        SEND_VAR                                                     $2
          8        DO_ICALL                                                     
          9      > RETURN                                                       1

Class I1:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s0juS
function name:  foo
number of ops:  2
compiled vars:  !0 = $bar
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1      > RETURN                                                       null

End of function foo

End of class I1.

Class I2:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s0juS
function name:  foo
number of ops:  2
compiled vars:  !0 = $bar
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
          1      > RETURN                                                       null

End of function foo

End of class I2.

Class A:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s0juS
function name:  foo
number of ops:  2
compiled vars:  !0 = $bar
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
          1      > RETURN                                                       null

End of function foo

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.86 ms | 2014 KiB | 14 Q