mirror of
https://codeberg.org/vlw/php-globalsnapshot.git
synced 2025-09-14 04:13:42 +02:00
chore: add readonly properties
This commit is contained in:
parent
80cb5d17b2
commit
855222e4c4
1 changed files with 8 additions and 8 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue