xref: /PHP-7.4/Zend/tests/globals_003.phpt (revision 782352c5)
1--TEST--
2globals in local scope - 2
3--INI--
4variables_order="egpcs"
5--FILE--
6<?php
7
8class test {
9
10	static function bar() {
11
12		var_dump(isset($_SERVER));
13		var_dump(empty($_SERVER));
14		var_dump(gettype($_SERVER));
15		var_dump(count($_SERVER));
16
17		var_dump($_SERVER['PHP_SELF']);
18		unset($_SERVER['PHP_SELF']);
19		var_dump($_SERVER['PHP_SELF']);
20
21		unset($_SERVER);
22		var_dump($_SERVER);
23
24	}
25}
26
27test::bar();
28
29echo "Done\n";
30?>
31--EXPECTF--
32bool(true)
33bool(false)
34string(5) "array"
35int(%d)
36string(%d) "%s"
37
38Notice: Undefined index: PHP_SELF in %s on line %d
39NULL
40
41Notice: Undefined variable: _SERVER in %s on line %d
42NULL
43Done
44