runkit7_function_copy
PHP function
Edit on GitHub ✎
(PECL runkit7 >= Unknown)
Copy a function to a new function name
Description
runkit7_function_copy(string $source_name, string $target_name): bool
Parameters
source_nameName of the existing function
target_nameName of the new function to copy the definition to
Return Values
Success
Examples
A runkit7_function_copy() example
php
<?php
function original() {
echo "In a function\n";
}
runkit7_function_copy('original','duplicate');
original();
duplicate();
?>The above example will output:
output
In a function
In a function