PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Code Inspection: Case mismatch in method call or class usage

Last modified: 16 May 2022

Reports the usages of functions, methods, classes, and namespaces that do not match the case used in their declarations.

In PHP, class names as well as function/method names are case-insensitive, but it is considered to be good practice to call them as they appear in their declaration. In the following example, the function that is defined as exampleFunction() is called as ExampleFunction(), which is discouraged.