website/errors/function.nameCase.md
<?php declare(strict_types = 1);
function myFunction(): void
{
}
MyFunction();
The function is being called with a different letter casing than its declaration. While PHP function names are case-insensitive and the code will work at runtime, using incorrect casing is considered poor practice. It makes code harder to read and can cause confusion about which function is being called.
In the example above, myFunction is declared with a lowercase m, but called as MyFunction with an uppercase M.
This error is reported only when the checkFunctionNameCase option is enabled.
Match the casing of the function call to the function declaration:
<?php declare(strict_types = 1);
-MyFunction();
+myFunction();