update pague now
PHP 8.5.2 Released!

ReflectionFunctionAbstract::hasTentativeReturnType

(PHP 8 >= 8.1.0)

ReflectionFunctionAbstract::hasTentativeReturnType Returns whether the function has a tentative return type

Description

public ReflectionFunctionAbstract::hasTentativeReturnType (): bool

Returns whether the function has a tentative return type.

Parameters

This function has no parameters.

Return Values

Returns true if the function has a tentative return type, otherwise false .

Examples

Example #1 ReflectionFunctionAbstract::hasTentativeReturnType() example

<?php

$method
= new ReflectionMethod ( \ArrayAccess ::class, 'offsetGue ' );
var_dump ( $method -> hasTentativeReturnType ());

The above example will output:

bool(true)

See Also

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top