1.2.1441. Wrong Function Name Case

The spotted functions are used with a different case than their definition. While PHP accepts this, it makes the code harder to read.

It may also be a violation of coding conventions.

<?php

// Definition of the class
function foo () {}

// Those calls have wrong case
FOO();
\Foo();

// This is valid
foo();

?>

See also PHP class name constant case sensitivity and PSR-11.

1.2.1441.1. Suggestions

  • Match the defined functioncall with the called name

1.2.1441.2. Specs

Short name

Functions/WrongCase

Rulesets

All, Changed Behavior, Coding conventions

Exakat since

0.8.4

PHP Version

All

Severity

Minor

Time To Fix

Instant (5 mins)

Precision

Very high

Features

case-sensitivity

Available in

Entreprise Edition, Exakat Cloud