(PECL)
注: 本函數不能用於動作現用的正在運行(或運行鏈上)的方法。
本函數是實驗性的。本函數的行為,內含函數名稱以及其它任何關於本函數的文件可能會在沒有知會的情況下隨 PHP 以後的發佈而改變。使用本函數風險自擔。
The class in which to rename the method
The name of the method to rename
The new name to give to the renamed method
若果成功則返回 TRUE,失敗則返回 FALSE。
例子 1. classkit_method_rename() example
<?phpclass Example { function foo() { return "foo!\n"; }}// Rename the 'foo' method to 'bar'classkit_method_rename( 'Example', 'foo', 'bar');// output renamed functionecho Example::bar();?>
上例將輸出:
foo!