ReflectionFunction::__toString

(PHP 5, PHP 7, PHP 8)

ReflectionFunction::__toStringConvertir a string

Descripción

publicReflectionFunction::__toString(): string

Convierte a string.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

Devuelve una salida similar a la de ReflectionFunction::export().

Ejemplos

Ejemplo #1 Ejemplo de ReflectionFunction::__toString()

<?php
function título($título, $nombre)
{
return
sprintf("%s. %s\r\n", $título, $nombre);
}

echo new
ReflectionFunction('título');
?>

El resultado del ejemplo sería algo similar a:

Function [ <user> function title ] { @@ Command line code 2 - 5 - Parameters [2] { Parameter #0 [ <required> $título ] Parameter #1 [ <required> $nombre ] } }

Ver también

To Top