1.2.804. No Initial S In Variable Names

The initial capital S in a variable name, may easily be mistaken with the dollar sign. This rules reports all variables that use a capital S as first letter after the dollar sign, to avoid this problem.

<?php

$$ocket = $Socket;

?>

1.2.804.1. Suggestions

  • Avoid using an initial capital S in variable and static property names.

1.2.804.2. Specs

Short name

Variables/NoInitialS

Rulesets

All, Semantics

Exakat since

2.5.0

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Very high

Available in

Entreprise Edition, Exakat Cloud