php8.5
Home/ Manual/ uopz / functions/ uopz_get_return

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

class

The name of the class containing the function

function

The 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

Source: reference/uopz/functions/uopz-get-return.xml · from the official PHP manual (php/doc-en)