The ReflectionFunction class

(PHP 5, PHP 7, PHP 8)

Introduction

The ReflectionFunction class reports information about a function.

Class synopsis

class ReflectionFunction extends ReflectionFunctionAbstract implements Reflector {
/* Constants */
const int IS_DEPRECATED = 262144;
/* Properties */
public $name;
/* Methods */
public __construct(Closure|string $function)
public static export(string $name, string $return = ?): string
public invoke(mixed ...$args): mixed
public invokeArgs(array $args): mixed
public isDisabled(): bool
public __toString(): string
/* Inherited methods */
public ReflectionFunctionAbstract::getAttributes(?string $name = null, int $flags = 0): array
}

Properties

name

Name of the function. Read-only, throws ReflectionException in attempt to write.

Predefined Constants

ReflectionFunction Modifiers

ReflectionFunction::IS_DEPRECATED

Indicates deprecated functions.

Table of Contents

add a note add a note

User Contributed Notes

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