(PHP 5, PHP 7)
ReflectionFunction::export — Exports function
This function has been DEPRECATED as of PHP 7.4.0, and REMOVED as of PHP 8.0.0. Relying on this function is highly discouraged.
Exports a Reflected function.
If the return
parameter
is set to true
, then the export is returned as a string ,
otherwise null
is returned.
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 ]
}
}