CakeFest 2024: The Official CakePHP Conference

ReflectionFunctionAbstract::hasTentativeReturnType

(PHP 8 >= 8.1.0)

ReflectionFunctionAbstract::hasTentativeReturnTypeDevuelve si la función tiene un tipo de retorno tentativo

Descripción

public ReflectionFunctionAbstract::hasTentativeReturnType(): bool

Devuelve si la función tiene un tipo de retorno tentativo.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

Devuelve true si la función tiene un tipo de retorno tentativo, en caso contrario false.

Ejemplos

Ejemplo #1 Ejemplo de ReflectionFunctionAbstract::hasTentativeReturnType()

<?php

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

El resultado del ejemplo sería:

bool(true)

Ver también

add a note

User Contributed Notes

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