PHP RFC: Use alias to provide both legacy and consistent names
- Version: 0.9
- Date: 2014-01-23
- Author: Yasuo Ohgaki, firstname.lastname@example.org
- Status: Inactive
- First Published at: http://wiki.php.net/rfc/consistent-names
PHP has been developed about 20 years. Many legacy functions/methods do not comply CODING_STANDARDS “Naming Conventions”.
Inconsistent names are not appealing for new users. Having consistent names would help to assure PHP's attractiveness to learn. Older names should be usable for compatibility.
Both consistency and compatibility is mandatory, aliases may be used.
Add CODING_STANDARDS compliant name as default name and add legacy name as alias.
- De facto standard names like string operation function (e.g. strcmp()) remains as it is now.
- Other names like mb_encode_mimeheader() become alias of mb_encode_mime_header().
- Names in question are discussed in email@example.com
- Aliases are not deprecated and should remain at least next 10 years or more.
Backward Incompatible Changes
Proposed PHP Version(s)
5.7 or later
Impact to Existing Extensions
Many extensions would have aliases.
There may be constants that may have better names(?)
Decide which names to be “De factt standard”
Proposed Voting Choices
Patches and Tests
It's a simple aliasing.
After the project is implemented, this section should contain
- the version(s) it was merged to
- a link to the git commit(s)
- a link to the PHP manual entry for the feature