uopz_set_return

PECL uopz 5, PECL uopz 6, PECL uopz 7
uopz_set_return - Provide a return value for an existing function
Manual
Code Examples

uopz_set_return( string$function, mixed$value, [bool$execute = false] ): bool
booluopz_set_return stringclass stringfunction mixedvalue boolexecutefalse

Parameters

class

The name of the class containing the function

function

The name of an existing function

value

The value the function should return. If a Closure is provided and the execute flag is set, the Closure will be executed in place of the original function.

execute

If true, and a Closure was provided as the value, the Closure will be executed in place of the original function.

Return Values

True if succeeded, false otherwise.

Example of uopz_set_return

Show all examples for uopz_set_return

PHP Version: