hphp/hack/manual/apis/Classes/ReflectionParameter/index.md
:::info[Note] This is a point-in-time snapshot of the API documentation from January 2026. Going forward, we will not be maintaining a public copy of these references, and recommend users to refer to the built-in signature helpers available in the Hack LSP instead for complete and up-to-date information. :::
( excerpt from http://php.net/manual/en/class.reflectionparameter.php )
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 ReflectionParameter implements Reflector {...}
::export($function, $parameter, $return = false)->__construct($function, $parameter, $info = NULL)->__toString()->allowsNull()->canBePassedByValue()->getAttribute(string $name): ?varray<mixed>->getAttributeClass<T as HH\ParameterAttribute>(classname<T> $c): ?T->getAttributes(): darray<string, varray<mixed>>->getAttributesNamespaced()->getClass()->getDeclaringClass()->getDeclaringFunction()->getDefaultValue()->getDefaultValueConstantName()->getDefaultValueText()->getName()->getPosition()->getType(): ?ReflectionType->getTypeText(): string->getTypehintText()->hasAttribute(string $name): bool->hasType(): bool->isArray()->isCallable()->isDefaultValueAvailable()->isDefaultValueConstant(): ?bool->isInOut(): bool->isOptional(): bool->isPassedByReference()->isReadonly(): bool->isVariadic(): bool->toString()