You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
various, depends on when the function(s) were introduced
Sniff type:
Best Practice
Fixer type:
Safe/Risky (depending on the function)
Short description
As a general best practice, it is recommended not to use alias functions.
Related PHPCompatibility sniff(s):
N/A
PHP manual references:
There are quite a few functions in PHP which you can call with more than one name. In some cases there is no preferred name among the multiple ones, is_int() and is_integer() are equally good for example. However there are functions which changed names because of an API cleanup or some other reason and the old names are only kept as aliases for backward compatibility. It is usually a bad idea to use these kind of aliases, as they may be bound to obsolescence or renaming, which will lead to unportable script. This list is provided to help those who want to upgrade their old scripts to newer syntax.
Short description
As a general best practice, it is recommended not to use alias functions.
Related PHPCompatibility sniff(s):
PHP manual references:
http://php.net/manual/en/aliases.php
Example code:
Detect the following code pattern(s):
And fix these to:
Notes for implementation of the sniff:
Prior art:
no_alias_functions
The text was updated successfully, but these errors were encountered: