No Reference To $GLOBALS Variable
It is not possible anymore to create a reference to the $GLOBALS variable. It prevents any unexpected updates to this array. It was possible until PHP 8.2.
It is still possible to make a reference to any of the element of that array, individually.
PHP code
<?php
$b = &$GLOBALS;
print_r($b);
?>
Before
Array
(
[_GET] => Array
(
)
[_POST] => Array
(
)
[_COOKIE] => Array
(
)
// .... and more
?>
After
PHP Fatal error: Cannot acquire reference to $GLOBALS
PHP version change
This behavior changed in 8.2.