(PECL runkit:0.7-0.9)
runkit_function_redefine — Replace a function definition with a new implementation
Nota: Per default, solo le funzioni in userspace possono essere rimosse, rinominate o modificate. Per effettuare l'override delle funzioni interne, si deve abilitare il parametro runkit.internal_override nel file php.ini di sistema.
Name of function to redefine
New list of arguments to be accepted by function
New code implementation
Restituisce TRUE in caso di successo, FALSE in caso di fallimento.
Example#1 A runkit_function_redefine() example
<?php
function testme() {
echo "Original Testme Implementation\n";
}
testme();
runkit_function_redefine('testme','','echo "New Testme Implementation\n";');
testme();
?>
Il precedente esempio visualizzerĂ :
Original Testme Implementation New Testme Implementation