private function Snapshot::snapshotSuperGlobalArray in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/sebastian/global-state/src/Snapshot.php \SebastianBergmann\GlobalState\Snapshot::snapshotSuperGlobalArray()
Creates a snapshot a super-global variable array.
Parameters
$superGlobalArray:
1 call to Snapshot::snapshotSuperGlobalArray()
- Snapshot::snapshotGlobals in vendor/
sebastian/ global-state/ src/ Snapshot.php - Creates a snapshot of all global and super-global variables.
File
- vendor/
sebastian/ global-state/ src/ Snapshot.php, line 360
Class
- Snapshot
- A snapshot of global state.
Namespace
SebastianBergmann\GlobalStateCode
private function snapshotSuperGlobalArray($superGlobalArray) {
$this->superGlobalVariables[$superGlobalArray] = array();
if (isset($GLOBALS[$superGlobalArray]) && is_array($GLOBALS[$superGlobalArray])) {
foreach ($GLOBALS[$superGlobalArray] as $key => $value) {
$this->superGlobalVariables[$superGlobalArray][$key] = unserialize(serialize($value));
}
}
}