3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f(\Reflector $r): \Reflector { return $r; } function g(\ReflectionClassConstant $r) { return f($r); } class C { const X = 5; } g(new \ReflectionClassConstant(C::class, 'X'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iBjV7
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'g'
          1        NEW                                              $0      'ReflectionClassConstant'
          2        SEND_VAL_EX                                              'C'
          3        SEND_VAL_EX                                              'X'
          4        DO_FCALL                                      0          
          5        SEND_VAR                                                 $0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function f

Function g:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iBjV7
function name:  g
number of ops:  6
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'f'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
    9     5*     > RETURN                                                   null

End of function g

Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.57 ms | 1402 KiB | 15 Q