ReflectionFunction
class ReflectionFunction extends ReflectionFunctionAbstract (View source)
The ReflectionFunction class reports information about a function.
Constants
IS_DEPRECATED |
Indicates deprecated functions. |
Properties
string | $name |
Methods
Returns the scope associated to the closure
Gets number of required parameters
Gets the specified return type of a function
Checks if the function has a specified return type
No description
Returns the string representation of the ReflectionFunction object.
Exports function
Checks if function is disabled
Invokes function
Invokes function args
Returns a dynamically created closure for the function
No description
Details
bool
inNamespace()
Checks if function in namespace
bool
isClosure()
Checks if closure
bool
isDeprecated()
Checks if deprecated
bool
isInternal()
Checks if is internal
bool
isUserDefined()
Checks if user defined
bool
isGenerator()
Returns whether this function is a generator
bool
isVariadic()
Returns whether this function is variadic
object|null
getClosureThis()
Returns this pointer bound to closure
ReflectionClass|null
getClosureScopeClass()
Returns the scope associated to the closure
ReflectionClass|null
getClosureCalledClass()
No description
string|false
getDocComment()
Gets doc comment
int|false
getEndLine()
Gets end line number
ReflectionExtension|null
getExtension()
Gets extension info
string|false
getExtensionName()
Gets extension name
string|false
getFileName()
Gets file name
string
getName()
Gets function name
string
getNamespaceName()
Gets namespace name
int
getNumberOfParameters()
Gets number of parameters
int
getNumberOfRequiredParameters()
Gets number of required parameters
array
getParameters()
Gets parameters
ReflectionType|null
getReturnType()
Gets the specified return type of a function
string
getShortName()
Gets function short name
int|false
getStartLine()
Gets starting line number
array
getStaticVariables()
Gets static variables
bool
returnsReference()
Checks if returns reference
bool
hasReturnType()
Checks if the function has a specified return type
array
getAttributes(string|null $name = null, int $flags = 0)
No description
array
getClosureUsedVariables()
No description
bool
hasTentativeReturnType()
No description
ReflectionType|null
getTentativeReturnType()
No description
bool
isStatic()
No description
string
__toString()
Returns the string representation of the ReflectionFunction object.
__construct(string|Closure $function)
Constructs a ReflectionFunction object
static string|null
export(string $name, bool $return = false)
Exports function
bool
isDisabled()
Checks if function is disabled
mixed
invoke(mixed ...$args)
Invokes function
mixed
invokeArgs(array $args)
Invokes function args
Closure
getClosure()
Returns a dynamically created closure for the function
bool
isAnonymous()
No description