(PECL runkit7 >= 未知)
runkit7_method_remove — 動態移除指定方法
class_name
要移除方法的類別
method_name
要移除的方法的名稱
範例 #1 runkit7_method_remove() 範例
<?php
class Example {
function foo() {
return "foo!\n";
}
function bar() {
return "bar!\n";
}
}
// 移除 'foo' 方法
runkit7_method_remove(
'Example',
'foo'
);
echo implode(' ', get_class_methods('Example'));
?>
以上範例會輸出
bar