Hi,
I have an list of items that is stored in the $_SERVER["my_key"]
. Are these items garbage collected automatically?
Hi,
I have an list of items that is stored in the $_SERVER["my_key"]
. Are these items garbage collected automatically?
If there's nothing referencing the list (e.g. when you unset($_SERVER['my_key'])
), it will be GC'd sooner or later (at the latest, when your script terminates).
$_SERVER is a superglobal array and all values in this array will be the one and only time garbage collected when the script finishes execution.