2
I remember that a while ago, when I was starting programming with PHP, I saw in some tutorials a recommendation, warning that it was to avoid using some functions that are nicknamed for others.
I don’t know if I’m wrong, but in the PHP Handbook itself, when you entered the page of a function that was an alias (for example session_commit
and sizeof
), had a warning something like this:
The function
y
is a nickname for the functionx
, therefore its use should be avoided as it can be removed in future versions.
I may be mistaken, but I have the impression that there was a time when you commented that new versions of php would remove all alias functions, to make the thing more organized.
But what I have noticed is that even after PHP 7 is released, the alias functions are still there, and there is no recommendation when using it or not the same.
Examples:
I would like to know if there is any danger in using these synonymous functions/nicknames on account of having risk of being removed in the future.
Using function nicknames could also be bad from the point of view of some standard PHP encoding, such as PSR?
For example, would have some problem using sizeof
instead of using count
?
Nice, man. I got an example in the depreciation manual for being synonymous. I hunted it everywhere and I didn’t find, kkkk +1
– Wallace Maxters
@Wallacemaxters lacked a nose for finding :D
– rray