(PHP 8 >= 8.1.0)
ReflectionFunctionAbstract::hasTentativeReturnType — Returns whether the function has a tentative return type
Returns whether the function has a tentative return type.
This function has no parameters.
Example #1 ReflectionFunctionAbstract::hasTentativeReturnType() example
<?php
$method
= new
ReflectionMethod
(
\ArrayAccess
::class,
'offsetGue '
);
var_dump
(
$method
->
hasTentativeReturnType
());
The above example will output:
bool(true)