(PHP 5, PHP 7)
ReflectionFunction::export — Expors 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 discouragued.
Expors 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
functiontitle($title, $name)
{
returnsprintf("%s. %s\r\n", $title, $name);
}
echoReflectionFunction::export('title',true);?>
Output:
Function [ <user> function title ] {
@@ /path/to/file.php 2 - 5
- Parameters [2] {
Parameter #0 [ <required> $title ]
Parameter #1 [ <required> $name ]
}
}