Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<ReflectionFunctionAbstract::hasReturnTypeReflectionFunctionAbstract::inNamespace>
^ReflectionFunctionAbstractLast updated: Mon, 26 Oct 2026

ReflectionFunctionAbstract::hasTentativeReturnType

(PHP 8 >= 8.1.0)

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

Description

public function 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, 'offsetGet');
var_dump($method->hasTentativeReturnType());

The above example will output:

bool(true)

See Also


<ReflectionFunctionAbstract::hasReturnTypeReflectionFunctionAbstract::inNamespace>
^ReflectionFunctionAbstractLast updated: Mon, 26 Oct 2026