PHP: ReflectionFunction::export - Manual
(PHP 5, PHP 7)
ReflectionFunction::export — Exporta una función
Advertencia
Esta función está OBSOLETA a partir de PHP 7.4.0, y ha sido ELIMINADA a partir de PHP 8.0.0. Depender de esta función está altamente desaconsejado.
Descripción
public static ReflectionFunction::export(string $name, string $return = ?): string
Exporta una función reflejada.
Parámetros
Valores devueltos
Si el parámetro return
está definido a true, la exportación será retornada en forma de string,
de lo contrario, null será retornado.
Ver también
- ReflectionFunction::invoke() - Invoca una función
- ReflectionFunction::__toString() - Devuelve una representación textual del objeto ReflectionFunction
Found A Problem?
14 years ago
Example:
<?php
function title($title, $name)
{
return sprintf("%s. %s\r\n", $title, $name);
}
echo ReflectionFunction::export('title',true);
?>
Output:
Function [ <user> function title ] {
@@ /path/to/file.php 2 - 5
- Parameters [2] {
Parameter #0 [ <required> $title ]
Parameter #1 [ <required> $name ]
}
}