Le 22/01/2014 23:17, Yasuo Ohgaki a écrit :
On Sat, Dec 28, 2013 at 3:57 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
[...]
There are many functions that violate this for historical reason.
Since PHP has function alias feature by default, function names that
violate this standard could be renamed and keep historic names as aliases.
We may keep alias 10 or 20 years or even forever.
Good IDE can suggest correct names, but keeping inconsistent historic
function names forever damages PHP future in the long run, IMHO.
Any comments?
Added RFC for this.
https://wiki.php.net/rfc/consistent-names
Regards,
Hi,
Maybe it's a stupid idea, you'll tell me :) Wouldn't it be a good thing to issue a notice when people use the alias instead of the correct function name?
Taking your example in the RFC:
mb_encode_mimeheader() would issue a Notice while mb_encode_mime_header() wouldn't.
The message could be something like "Please note that mb_encode_mimeheader() is an alias for mb_encode_mime_header() for legacy reasons."
Cheers
Pascal