ReflectionFunctionAbstract::hasTentativeReturnType
PHP Manual
PHP Manual»ReflectionFunctionAbstract»ReflectionFunctionAbstract::hasTentativeReturnType

ReflectionFunctionAbstract::hasTentativeReturnType

(PHP 8 >= 8.1.0)

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

Descrizione

public function ReflectionFunctionAbstract::hasTentativeReturnType(): bool

Returns whether the function has a tentative return type.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

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

Esempi

Example #1 ReflectionFunctionAbstract::hasTentativeReturnType() example

<?php

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

Il precedente esempio visualizzerà:

bool(true)

Vedere anche:

To Top