0

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

Example:

use function array_keys as getArrayKeys;
apedic
  • 139
  • 2
  • 9

1 Answers1

4

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.

Andreas
  • 23,610
  • 6
  • 30
  • 62
  • 3
    Not to mention, if someone else takes over your code later, they will struggle to understand it if you use these aliases a lot. – Jolta Jan 25 '18 at 10:18