1.2.485. Function Called With Other Case Than Defined

Functions and methods are defined with a specific case. Often, this is done on purpose,

either to distinguish the method from others, such as PHP natives functions, or to follow a naming convention.

PHP functions are case insensitive, which leads to situations like : It is recommended to use the same casing in the function call and the function definition.

<?php
  function myUtility($arg) {
    /* some code here */
  }

   myutility($var);
?>

1.2.485.1. Suggestions

  • Use the same case for the function and its call.

1.2.485.2. Specs

Short name

Functions/FunctionCalledWithOtherCase

Rulesets

All, Semantics

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

function

Available in

Entreprise Edition, Exakat Cloud