apedic
apedic

Reputation: 145

Is a good practice aliasing php native functions?

would help PSR naming conventions. Would it be a good practice?

Example:

use function array_keys as getArrayKeys;

Upvotes: 0

Views: 81

Answers (1)

Andreas
Andreas

Reputation: 23958

It sounds as a bad practice in my opinion.
For the current project/page no harm is really done but in the long run you may/will forget what the real functions names are.
On the next project you will try getArrayKeys and it won't work.

Upvotes: 4

Related Questions