1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Files
archived-php-src/Zend/tests/globals_001.phpt
T
Nikita Popov c48b745f00 Promote "undefined array key" notice to warning
This implements the last remaining part of the
https://wiki.php.net/rfc/engine_warnings RFC.

Closes GH-5927.
2020-08-03 14:40:50 +02:00

35 lines
547 B
PHP

--TEST--
globals in global scope
--INI--
variables_order="egpcs"
--FILE--
<?php
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);
echo "Done\n";
?>
--EXPECTF--
bool(true)
bool(false)
string(5) "array"
int(%d)
string(%d) "%s"
Warning: Undefined array key "PHP_SELF" in %s on line %d
NULL
Warning: Undefined variable $_SERVER in %s on line %d
NULL
Done