File: 0002-uopz_set_static_clear.phpt

package info (click to toggle)
php-uopz 7.1.1%2B%2B-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 688 kB
  • sloc: ansic: 2,137; xml: 335; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 341 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
uopz_set_static with empty array
--EXTENSIONS--
uopz
--INI--
uopz.disable=0
--FILE--
<?php
class Foo {
	public static function bar () {
		static $baz = null;

		return $baz;
	}
}

uopz_set_static ('Foo', 'bar', ["baz" => 1]);
var_dump(Foo::bar());
uopz_set_static ('Foo', 'bar', []);
var_dump(Foo::bar());
?>
--EXPECT--
int(1)
NULL