Php/docs/class.reflectionparameter

From Get docs

(PHP 5, PHP 7)

Introduction

The ReflectionParameter class retrieves information about function's or method's parameters.

To introspect function parameters, first create an instance of the ReflectionFunction or ReflectionMethod classes and then use their ReflectionFunctionAbstract::getParameters() method to retrieve an array of parameters.


Class synopsis


ReflectionParameter implements Reflector {

/* Properties */

public $name

/* Methods */

public allowsNull ( ) : bool

public canBePassedByValue ( ) : bool

final private __clone ( ) : void

public __construct ( callable $function , mixed $parameter )

public static export ( string $function , string $parameter [, bool $return ] ) : string

public getClass ( ) : ReflectionClass

public getDefaultValue ( ) : mixed

public getDefaultValueConstantName ( ) : string

public getName ( ) : string

public getPosition ( ) : int

public getType ( ) : ReflectionType

public hasType ( ) : bool

public isArray ( ) : bool

public isCallable ( ) : bool

public isDefaultValueAvailable ( ) : bool

public isDefaultValueConstant ( ) : bool

public isOptional ( ) : bool

public isPassedByReference ( ) : bool

public isVariadic ( ) : bool

public __toString ( ) : string

}

Properties

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


Table of Contents