Reflection
PHP Manual

The ReflectionParameter class

(PHP 5)

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 */
/* Methods */
public bool ReflectionParameter::allowsNull ( void )
final private void ReflectionParameter::__clone ( void )
public ReflectionParameter::__construct ( string $function , string $parameter )
public static string ReflectionParameter::export ( string $function , string $parameter [, bool $return ] )
public ReflectionClass ReflectionParameter::getClass ( void )
public ReflectionClass ReflectionParameter::getDeclaringClass ( void )
public ReflectionFunction ReflectionParameter::getDeclaringFunction ( void )
public string ReflectionParameter::getName ( void )
public bool ReflectionParameter::isArray ( void )
public bool ReflectionParameter::isOptional ( void )
public string ReflectionParameter::__toString ( void )
}

Properties

name

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

Table of Contents


Reflection
PHP Manual