PHP 8.1.0 Beta 1 available for testing

uopz_get_return

(PECL uopz 5, PECL uopz 6)

uopz_get_returnGets a previous set return value for a function

説明

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().

パラメータ

class

The name of the class containing the function

function

The name of the function

返り値

The return value or Closure previously set.

例1 uopz_get_return() example

<?php
uopz_set_return
("strlen"42);
echo 
uopz_get_return("strlen");
?>

上の例の出力は以下となります。

42
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top