uopz_get_return
PHP function
Edit on GitHub ✎
(PECL uopz 5, PECL uopz 6, PECL uopz 7)
Gets a previous set return value for a function
Description
uopz_get_return(string $function): mixed
uopz_get_return(string $class, string $function): mixed
Gets the return value of the function previously set by uopz_set_return.
Parameters
classThe name of the class containing the function
functionThe name of the function
Return Values
The return value or Closure previously set.
Examples
uopz_get_return() example
php
<?php
uopz_set_return("strlen", 42);
echo uopz_get_return("strlen");
?>The above example will output:
output
42