summaryrefslogtreecommitdiff
path: root/Zend/tests/globals_003.phpt
blob: cdd4d211afd2f120f388b8ee6d86f37c92c3b3ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--TEST--
globals in local scope - 2
--INI--
variables_order="egpcs"
--FILE--
<?php

class test {

	static function bar() {

		var_dump(isset($_SERVER));
		var_dump(empty($_SERVER));
		var_dump(gettype($_SERVER));
		var_dump(count($_SERVER));

		var_dump($_SERVER['PHP_SELF']);
		unset($_SERVER['PHP_SELF']);
		var_dump($_SERVER['PHP_SELF']);

		unset($_SERVER);
		var_dump($_SERVER);

	}
}

test::bar();

echo "Done\n";
?>
--EXPECTF--
bool(true)
bool(false)
string(5) "array"
int(%d)
string(%d) "%s"

Notice: Undefined index: PHP_SELF in %s on line %d
NULL

Notice: Undefined variable: _SERVER in %s on line %d
NULL
Done