3v4l.org

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

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sXWVN
function name:  foo
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 foo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.84 ms | 476 KiB | 8 Q