Why does PHP have alias functions, and why does it have this design?

such as join () and implode ()
such as rtrim () and chop ()
Why does such an alias function appear? What kind of problems are they designed to solve?

Php
Mar.07,2021

using aliases is usually not a good idea because it may be abandoned or redefined. This can lead to the emergence of non-portable scripts. The purpose of this list is to help developers who want to upgrade their old scripts to the new version of syntax. Many PHP functions have an alias that can be called with an alias. In some cases, both names are so appropriate that there is no choice. Is_int () and is_integer () are good examples. In some cases, the function name is modified due to internal API cleanup or other reasons, but the old name is retained to ensure backward compatibility. Using such an alias is usually not a good idea because it can be completely abandoned or renamed, making it difficult for scripts to migrate to a new version of PHP.

http://php.net/manual/zh/alia.


for the most part, the early development of PHP is not standard (this can be seen from its function naming, parameter order, and so on), which leads to the naming of a function is not a commonly used name. Later, in order to be more standardized, the naming of some functions was changed to be consistent with most languages, but the original name was retained because of compatibility problems in the old version.


these are problems left over by history

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32eaf-2b6a4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32eaf-2b6a4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?