1.2.176. Collect Global Variables

This rule collects the names of the global variables. The global variables are collected from $GLOBALS usage, global keyword usage and variables in the global space.

<?php

global $x;

$GLOBALS['y'] = 3;

?>

1.2.176.1. Connex PHP features

1.2.176.1.1. Specs

Short name

Dump/CollectGlobalVariables

Rulesets

All, CE, Changed Behavior, Dump

Exakat since

2.1.7

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

High

Available in

Entreprise Edition, Community Edition, Exakat Cloud