chore: add readonly properties

This commit is contained in:
Victor Westerlund 2024-11-23 10:18:57 +01:00
parent 80cb5d17b2
commit 855222e4c4

View file

@ -7,14 +7,14 @@
// can be restored to this point in time by calling $this->restore(); // can be restored to this point in time by calling $this->restore();
class GlobalSnapshot { class GlobalSnapshot {
// Declare all PHP superglobals // Declare all PHP superglobals
private array $_ENV; private readonly array $_ENV;
private array $_GET; private readonly array $_GET;
private array $_POST; private readonly array $_POST;
private array $_FILES; private readonly array $_FILES;
private array $_SERVER; private readonly array $_SERVER;
private array $_COOKIE; private readonly array $_COOKIE;
private array $_REQUEST; private readonly array $_REQUEST;
private array $_SESSION; private readonly array $_SESSION;
// Declare additional PHP globals (for PHP 8.0+ compatability) // Declare additional PHP globals (for PHP 8.0+ compatability)
// These will not be captured, or altered by GlobalSnapshot // These will not be captured, or altered by GlobalSnapshot