php8.5
Home/ Manual/ reflection / reflectionparameter/ ReflectionParameter::__toString

ReflectionParameter::__toString

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

To string

Description

ReflectionParameter::__toString(): string

Get a human-readable description of the parameter.

Parameters Parameters

Return Values

The string.

Examples

ReflectionParameter::__toString example

php
<?php
echo new ReflectionParameter('substr', 0);
?>

The above example will output something similar to:

output
Parameter #0 [ <required> string $string ]

See Also

  • ReflectionFunction::__toString
  • ReflectionMethod::__toString
  • __toString()

Source: reference/reflection/reflectionparameter/tostring.xml · from the official PHP manual (php/doc-en)