# Clase ReflectionFunction

(PHP 5, PHP 7, PHP 8)

## Introducción

La ReflectionFunction muestra información sobre una función.

## Sinopsis de la Clase

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

## Propiedades

name

  Nombre de la función. De sólo lectura, lanza una ReflectionException en el intento de escribir.

## Constantes predefinidas

## Modificadores ReflectionFunction

`ReflectionFunction::IS_DEPRECATED`

  Indica las funciones obsoletas.

## Tabla de contenidos

- ReflectionFunction::__construct — Contruye un objeto de tipo ReflectionFunction
- ReflectionFunction::export — Exporta una función
- ReflectionFunction::getClosure — Genera dinámicamente una función anónima de esta función
- ReflectionFunction::invoke — Invoca una función
- ReflectionFunction::invokeArgs — Invoca a la función con argumentos
- ReflectionFunction::isAnonymous — Checks if a function is anonymous
- ReflectionFunction::isDisabled — Comprueba si una función está desactivada
- ReflectionFunction::__toString — Convertir a string