uopz_set_static
uopz_set_static
Sets the static variables in function or method scope
void **uopz_set_static** string $function array $static
void **uopz_set_static** string $class string $function array $static
Sets the static variables in function or method scope.
classThe name of the class.
functionThe name of the function or method.
static
The associative of variable names mapped to their
values.
array
return.void
Voorbeeld: Basic Usage
<?php
function foo() {
static $bar = 'baz';
var_dump($bar);
}
uopz_set_static('foo', ['bar' => 'qux']);
foo();
?>
string(3) "qux"
uopz_get_static