(PHP 8 >= 8.1.0)
ReflectionFunctionAbstract::hasTentativeReturnType — Indica si la función tiene un tipo de retorno provisional
Indica si la función tiene un tipo de retorno provisional.
Esta función no contiene ningún parámetro.
Devuelve true
si la función tiene un tipo de retorno provisional, de lo contrario false
.
Ejemplo #1 Ejemplo de ReflectionFunctionAbstract::hasTentativeReturnType()
<?php
$method = new ReflectionMethod(\ArrayAccess::class, 'offsetGet');
var_dump($method->hasTentativeReturnType());
El ejemplo anterior mostrará :
bool(true)