array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.runkit7-function-copy.php', 1 => 'runkit7_function_copy', ), 'up' => array ( 0 => 'ref.runkit7.php', 1 => 'runkit7 Funktionen', ), 'prev' => array ( 0 => 'function.runkit7-function-add.php', 1 => 'runkit7_function_add', ), 'next' => array ( 0 => 'function.runkit7-function-redefine.php', 1 => 'runkit7_function_redefine', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/runkit7/functions/runkit7-function-copy.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL runkit7 >= Unknown)
runkit7_function_copy — Copy a function to a new function name
source_name
Name of the existing function
target_name
Name of the new function to copy the definition to
Beispiel #1 A runkit7_function_copy() example
<?php
function original() {
echo "In a function\n";
}
runkit7_function_copy('original','duplicate');
original();
duplicate();
?>
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
In a function In a function