destination_class
destination_method_name
source_class
source_method_name
<? php
class Foo {
function example () {
return "foo!\n" ;
}
}
class Bar {
// initially, no methods
}
// copy the example() method from the Foo class to the Bar class, as baz()
runkit7_method_copy ( 'Bar' , 'baz' , 'Foo' , 'example' );
// output copied function
echo Bar :: baz ();
?>
foo!