runkit_function_redefine

(PECL)

runkit_function_redefine --  Replace a function definition with a new implementation

Descrizione

bool runkit_function_redefine ( string funcname, string arglist, string code )

Elenco dei parametri

funcname

Name of function to redefine

arglist

New list of arguments to be accepted by function

code

New code implementation

Valori restituiti

Restituisce TRUE in caso di successo, FALSE in caso di fallimento.

Esempi

Esempio 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

Vedere anche:

runkit_function_add()
runkit_function_copy()
runkit_function_rename()
runkit_function_remove()