This extension allows overrides functions.
- override_function — Overrides functions
bool override_function ( string $name , string $args , string $code [ , string $origin ] )
Overrides functions by replacing them in the symbol table.
-
name
The function to override.
-
args
The function arguments, as a comma separated string.
-
code
The new code for the function.
-
origin
Original function to rename.
Returns TRUE on success or FALSE on failure.
override_function('test', '$a,$b', 'echo "TEST"; return $a * $b;');
override_function('test', '$a,$b', 'echo "TEST"; return $a * $b;', 'origin_test');