1.2.1016. Real Variables

Inventory of real variables. Global, Static and property declarations are skipped here.

This is a refined version of a search on T_VARIABLE token.

<?php

$realVariable = 1;

class foo {
    private $property;        // not a variable

    private function bar() {
        global $global;       // not a variable
        static $static;       // not a variable

    }
}

?>

1.2.1016.1. Specs

Short name

Variables/RealVariables

Rulesets

All

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Available in

Entreprise Edition, Exakat Cloud