php-src/Zend/tests/restrict_globals/invalid_assign_list.phpt
Nikita Popov 3c68f38fda Restrict allowed usages of $GLOBALS
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.
2021-01-06 12:46:24 +01:00

11 lines
196 B
PHP

--TEST--
Cannot list-assign to $GLOBALS
--FILE--
<?php
list($GLOBALS) = [1];
?>
--EXPECTF--
Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in %s on line %d