runkit7_method_remove
PHP function
Edit on GitHub ✎
(PECL runkit7 >= Unknown)
Dynamically removes the given method
Description
runkit7_method_remove(string $class_name, string $method_name): bool
Selfmanipulation
Parameters
class_nameThe class in which to remove the method
method_nameThe name of the method to remove
Return Values
Success
Examples
runkit7_method_remove() example
php
<?php
class Example {
function foo() {
return "foo!\n";
}
function bar() {
return "bar!\n";
}
}
// Remove the 'foo' method
runkit7_method_remove(
'Example',
'foo'
);
echo implode(' ', get_class_methods('Example'));
?>The above example will output:
output
bar