array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.uopz-copy.php', 1 => 'uopz_copy', ), 'up' => array ( 0 => 'ref.uopz.php', 1 => 'Uopz Funktionen', ), 'prev' => array ( 0 => 'function.uopz-compose.php', 1 => 'uopz_compose', ), 'next' => array ( 0 => 'function.uopz-del-function.php', 1 => 'uopz_del_function', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/uopz/functions/uopz-copy.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL uopz 1 >= 1.0.4, PECL uopz 2)
uopz_copy — Copy a function
Diese Funktion wurde mit PECL uopz 5.0.0 ENTFERNT.
Copy a function by name
class
The name of the class containing the function to copy
function
The name of the function
A Closure for the specified function
Beispiel #1 uopz_copy() example
<?php
$strtotime = uopz_copy('strtotime');
uopz_function("strtotime", function($arg1, $arg2) use($strtotime) {
/* can call original strtotime from here */
var_dump($arg1);
});
var_dump(strtotime('dummy'));
?>
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
string(5) "dummy"