array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.uopz-restore.php', 1 => 'uopz_restore', ), 'up' => array ( 0 => 'ref.uopz.php', 1 => 'Uopz 函数', ), 'prev' => array ( 0 => 'function.uopz-rename.php', 1 => 'uopz_rename', ), 'next' => array ( 0 => 'function.uopz-set-hook.php', 1 => 'uopz_set_hook', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/uopz/functions/uopz-restore.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL uopz 1 >= 1.0.3, PECL uopz 2)
uopz_restore — Restore a previously backed up function
This function has been REMOVED in PECL uopz 5.0.0.
Restore a previously backed up function
class
The name of the class containing the function to restore
function
The name of the function
示例 #1 uopz_restore() example
<?php
uopz_backup("fgets");
uopz_function("fgets", function(){
return true;
});
var_dump(fgets());
uopz_restore('fgets');
fgets();
?>
以上示例的输出类似于:
Warning: fgets() expects at least 1 parameter, 0 given in /path/to/script.php on line 8