3v4l.org

run code in 300+ PHP versions simultaneously
<?php function d(): double {} function f(): float {} function i(): int {} function ie(): integer {} function r(): real {} function bn(): boolean {} foreach (['d', 'f'] as $name) { $ref = new ReflectionFunction($name); var_dump([$name, $ref->getReturnType()->getName(), $ref->getReturnType()->isBuiltin()]); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 21
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 21
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/T9iRf
function name:  (null)
number of ops:  23
compiled vars:  !0 = $name, !1 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > FE_RESET_R                                       $2      <array>, ->21
          1    > > FE_FETCH_R                                               $2, !0, ->21
   11     2    >   NEW                                              $3      'ReflectionFunction'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $3
   12     6        INIT_FCALL                                               'var_dump'
          7        INIT_ARRAY                                       ~6      !0
          8        INIT_METHOD_CALL                                         !1, 'getReturnType'
          9        DO_FCALL                                      0  $7      
         10        INIT_METHOD_CALL                                         $7, 'getName'
         11        DO_FCALL                                      0  $8      
         12        ADD_ARRAY_ELEMENT                                ~6      $8
         13        INIT_METHOD_CALL                                         !1, 'getReturnType'
         14        DO_FCALL                                      0  $9      
         15        INIT_METHOD_CALL                                         $9, 'isBuiltin'
         16        DO_FCALL                                      0  $10     
         17        ADD_ARRAY_ELEMENT                                ~6      $10
         18        SEND_VAL                                                 ~6
         19        DO_ICALL                                                 
   10    20      > JMP                                                      ->1
         21    >   FE_FREE                                                  $2
   13    22      > RETURN                                                   1

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

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

End of function f

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

End of function i

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

End of function ie

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

End of function r

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

End of function bn

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.45 ms | 1015 KiB | 14 Q