ReflectionFunctionAbstract::hasTentativeReturnType

(PHP 8 >= 8.1.0)

ReflectionFunctionAbstract::hasTentativeReturnTypeReturns whether the function has a tentative return type

Description

public ReflectionFunctionAbstract::hasTentativeReturnType(): bool

Returns whether the function has a tentative return type.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

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

Exemples

Exemple #1 ReflectionFunctionAbstract::hasTentativeReturnType() example

<?php

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

L'exemple ci-dessus va afficher :

bool(true)

Voir aussi

add a note add a note

User Contributed Notes

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