php man page for override_function

Query: override_function

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

OVERRIDE_FUNCTION(3)							 1						      OVERRIDE_FUNCTION(3)

override_function - Overrides built-in functions

SYNOPSIS
bool override_function (string $function_name, string $function_args, string $function_code)
DESCRIPTION
Overrides built-in functions by replacing them in the symbol table.
PARAMETERS
o $function_name - The function to override. o $function_args - The function arguments, as a comma separated string. Usually you will want to pass this parameter, as well as the $func- tion_code parameter, as a single quote delimited string. The reason for using single quoted strings, is to protect the variable names from parsing, otherwise, if you use double quotes there will be a need to escape the variable names, e.g. $your_var. o $function_code - The new code for the function.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1 override_function(3) example <?php override_function('test', '$a,$b', 'echo "DOING TEST"; return $a * $b;'); ?> PHP Documentation Group OVERRIDE_FUNCTION(3)
Related Man Pages
runkit_method_add(3) - php
create_function(3) - php
apache_setenv(3) - php
gearmanclient(3) - php
gearmanworker(3) - php
Similar Topics in the Unix Linux Community
Change only the name of a variable
Writing a UNIX script from LOG to provide return code.