承接 vlw/globalsnapshot 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vlw/globalsnapshot

最新稳定版本:1.0.3

Composer 安装命令:

composer require vlw/globalsnapshot

包简介

Capture and restore the state of all PHP superglobals.

README 文档

README

Capture the current state of all PHP superglobal variables - which can then be restored to the state of capture at a later time.

Supports PHP 8.1+

Example use:

// Initial state
$_ENV["hello"] = "world"; // echo: "world"

// Capture initial state
$snapshot = (new GlobalSnapshot())->capture();

// Manipulate superglobals
$_ENV["hello"] .= " and mom!"; // echo: "world and mom"

// Restore initial state
$snapshot->restore();

// Initial state restored
echo $_ENV["hello"]; // echo: "world"

Quickstart

  1. Install with composer

    composer install vlw/globalsnapshot
    
  2. use in your project

    use vlw\GlobalSnapshot;
    
  3. Capture current superglobals with capture()

    // Initialize a new GlobalSnapshot instance to store current values (one snapshot per instance)
    $snapshot = new GlobalSnapshot();
    

// Capture current superglobal state $snapshot->capture();


3. Restore superglobals with `restore()`

// ... some other code

// Restore superglobals to state of capture() $snapshot->restore();


统计信息

  • 总下载量: 48
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unlicense
  • 更新时间: 2024-11-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固