3v4l.org

run code in 500+ PHP versions simultaneously
<?php function test1(): X|Y|int|float|false|null { } var_dump((new ReflectionFunction('test1'))->getReturnType()->allowsNull());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9U4u
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'var_dump'
          1        NEW                                                  $0      'ReflectionFunction'
          2        SEND_VAL_EX                                                  'test1'
          3        DO_FCALL                                          0          
          4        INIT_METHOD_CALL                                             $0, 'getReturnType'
          5        DO_FCALL                                          0  $2      
          6        INIT_METHOD_CALL                                             $2, 'allowsNull'
          7        DO_FCALL                                          0  $3      
          8        SEND_VAR                                                     $3
          9        DO_ICALL                                                     
         10      > RETURN                                                       1

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

End of function test1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
223.34 ms | 1995 KiB | 14 Q