php-src/Zend/tests/globals_003.phpt

44 lines
622 B
Plaintext
Raw Normal View History

2007-02-07 19:10:32 +08:00
--TEST--
globals in local scope - 2
2009-07-17 16:18:27 +08:00
--INI--
2007-02-07 19:10:32 +08:00
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
2007-02-07 19:10:32 +08:00
NULL
Notice: Undefined variable: _SERVER in %s on line %d
NULL
Done