From 3c68f38fdaec7a6f81f986a639bdd29716cf8f22 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 2 Dec 2020 17:47:33 +0100 Subject: 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. --- UPGRADING | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'UPGRADING') diff --git a/UPGRADING b/UPGRADING index 38dfda996a..f3d155d4f1 100644 --- a/UPGRADING +++ b/UPGRADING @@ -19,6 +19,15 @@ PHP 8.1 UPGRADE NOTES 1. Backward Incompatible Changes ======================================== +- Core: + . Access to the $GLOBALS array is now subject to a number of restrictions. + Read and write access to individual array elements like $GLOBALS['var'] + continues to work as-is. Read-only access to the entire $GLOBALS array also + continues to be supported. However, write access to the entire $GLOBALS + array is no longer supported. For example, array_pop($GLOBALS) will result + in an error. + RFC: https://wiki.php.net/rfc/restrict_globals_usage + - Fileinfo: . The fileinfo functions now accept and return, respectively, finfo objects instead of resources. -- cgit v1.2.1