mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
3c68f38fda
This restricts allowed usage of $GLOBALS, with the effect that plain PHP arrays can no longer contain INDIRECT elements. RFC: https://wiki.php.net/rfc/restrict_globals_usage Closes GH-6487.
29 lines
380 B
PHP
29 lines
380 B
PHP
--TEST--
|
|
globals in local scope - 3
|
|
--INI--
|
|
variables_order="egpcs"
|
|
--FILE--
|
|
<?php
|
|
|
|
function test() {
|
|
include __DIR__."/globals.inc";
|
|
}
|
|
|
|
test();
|
|
|
|
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 global variable $_SERVER in %s on line %d
|
|
NULL
|
|
Done
|