LonghornPHP 2026

ReflectionFunction::__toString

(PHP 5, PHP 7, PHP 8)

ReflectionFunction::__toStringDevuelve una representación textual del objeto ReflectionFunction

Descripción

public function ReflectionFunction::__toString(): string

Obtiene una representación textual legible por humanos de la función, sus argumentos y su valor de retorno.

Parámetros

Esta función no contiene ningún parámetro.

Valores devueltos

La cadena.

Ejemplos

Ejemplo #1 Ejemplo para ReflectionFunction::__toString()

<?php
function title($title, $name)
{
 return sprintf("%s. %s\r\n", $title, $name);
}
echo new ReflectionFunction('title');
?>

Resultado del ejemplo anterior es similar a:

Function [ <user> function title ] {
 @@ Command line code 1 - 1
 - Parameters [2] {
 Parameter #0 [ <required> $title ]
 Parameter #1 [ <required> $name ]
 }
}

Véase también

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes

There are no user contributed notes for this page.

AltStyle によって変換されたページ (->オリジナル) /