1.2.1001. Property Names

Variables are used in property definitions, when they are located in a class.

<?php

static $x; // not a property, a static variable

class foo {
    static $x; // now, this is a static property
    public $y, $z = 1; // normal properties

    public function bar() {
        static $x; // again, a static variable
    }
}

?>

See also Properties.

1.2.1001.1. Specs

Short name

Classes/PropertyDefinition

Rulesets

All

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

property

Available in

Entreprise Edition, Exakat Cloud