# La clase ReflectionFunction

(PHP 5, PHP 7, PHP 8)

## Introducción

La clase ReflectionFunction proporciona información sobre una función.

## Sinopsis de la Clase

class ReflectionFunction extends ReflectionFunctionAbstract {
/* Constantes */
public const int IS_DEPRECATED;
/* Propiedades heredadas */
public string $name;
/* Métodos */
public function __construct(Closure|string `$function`)
public static function export(string `$name`, string `$return` = ?): string
public function getClosure(): Closure
public function invoke(mixed `...$args`): mixed
public function invokeArgs(array `$args`): mixed
public function isAnonymous(): bool
#[\Deprecated]
public function isDisabled(): bool
public function __toString(): string
/* Métodos heredados */
private function ReflectionFunctionAbstract::__clone(): void
public function ReflectionFunctionAbstract::getAttributes(?string `$name` = null, int `$flags` = 0): array
public function ReflectionFunctionAbstract::getClosureCalledClass(): ?ReflectionClass
public function ReflectionFunctionAbstract::getClosureScopeClass(): ?ReflectionClass
public function ReflectionFunctionAbstract::getClosureThis(): ?object
public function ReflectionFunctionAbstract::getClosureUsedVariables(): array
public function ReflectionFunctionAbstract::getDocComment(): string|false
public function ReflectionFunctionAbstract::getEndLine(): int|false
public function ReflectionFunctionAbstract::getExtension(): ?ReflectionExtension
public function ReflectionFunctionAbstract::getExtensionName(): string|false
public function ReflectionFunctionAbstract::getFileName(): string|false
public function ReflectionFunctionAbstract::getName(): string
public function ReflectionFunctionAbstract::getNamespaceName(): string
public function ReflectionFunctionAbstract::getNumberOfParameters(): int
public function ReflectionFunctionAbstract::getNumberOfRequiredParameters(): int
public function ReflectionFunctionAbstract::getParameters(): array
public function ReflectionFunctionAbstract::getReturnType(): ?ReflectionType
public function ReflectionFunctionAbstract::getShortName(): string
public function ReflectionFunctionAbstract::getStartLine(): int|false
public function ReflectionFunctionAbstract::getStaticVariables(): array
public function ReflectionFunctionAbstract::getTentativeReturnType(): ?ReflectionType
public function ReflectionFunctionAbstract::hasReturnType(): bool
public function ReflectionFunctionAbstract::hasTentativeReturnType(): bool
public function ReflectionFunctionAbstract::inNamespace(): bool
public function ReflectionFunctionAbstract::isClosure(): bool
public function ReflectionFunctionAbstract::isDeprecated(): bool
public function ReflectionFunctionAbstract::isGenerator(): bool
public function ReflectionFunctionAbstract::isInternal(): bool
public function ReflectionFunctionAbstract::isStatic(): bool
public function ReflectionFunctionAbstract::isUserDefined(): bool
public function ReflectionFunctionAbstract::isVariadic(): bool
public function ReflectionFunctionAbstract::returnsReference(): bool
abstract public function ReflectionFunctionAbstract::__toString(): void
}

## Constantes predefinidas

## Modificadores de ReflectionFunction

ReflectionFunction::IS_DEPRECATED int

  Indica una función obsoleta.

## Historial de cambios

Versión | Descripción
--- | ---
8.4.0 | Las constantes de clase ahora están tipadas.
8.0.0 | ReflectionFunction::export() ha sido eliminada.

## Tabla de contenidos

- ReflectionFunction::__construct — Construye un nuevo objeto ReflectionFunction
- ReflectionFunction::export — Exporta una función
- ReflectionFunction::getClosure — Devuelve un cierre creado dinámicamente para la función
- ReflectionFunction::invoke — Invoca una función
- ReflectionFunction::invokeArgs — Invoca los argumentos de una función
- ReflectionFunction::isAnonymous — Verifica si la función es anónima
- ReflectionFunction::isDisabled — Verifica si una función está deshabilitada
- ReflectionFunction::__toString — Devuelve una representación textual del objeto ReflectionFunction

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open