Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70634 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88047 invoked from network); 14 Dec 2013 06:45:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Dec 2013 06:45:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=robert@cerny-online.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=robert@cerny-online.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cerny-online.com from 83.220.144.26 cause and error) X-PHP-List-Original-Sender: robert@cerny-online.com X-Host-Fingerprint: 83.220.144.26 webbox122.server-home.org Linux 2.6 Received: from [83.220.144.26] ([83.220.144.26:40427] helo=webbox122.server-home.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/F0-11187-88EFBA25 for ; Sat, 14 Dec 2013 01:45:29 -0500 SMTP-policy: ok Received: from [192.168.1.50] (unknown [91.177.39.141]) by webbox122.server-home.org (Postfix) with ESMTPA id AC48CC0E3F for ; Sat, 14 Dec 2013 07:49:16 +0100 (CET) Message-ID: <52ABFE84.8010404@cerny-online.com> Date: Sat, 14 Dec 2013 07:45:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: multipart/alternative; boundary="------------010308060203070101040107" Subject: Flexible function naming From: robert@cerny-online.com (Robert Cerny) --------------010308060203070101040107 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hello, I am new to the list. I have been a PHP user for 8 years. I am a progammer for 30 years. Initially i wanted to post this as an RFC, but could not figure out how to register. When accessing [1] i get 'Command disabled: register'. I did some research, but the archives are vast, so please accept my apologies in advance if this has already been discussed. When a PHP code base is growing over time it looks more and more 'diverse', because of inconsistent function and method naming in core PHP and third party libraries. This cannot be changed by any guidelines. The author of a function has the freedom to assign any name. The user of a function needs some flexibility in referring to a function. It should be possible to use 'array_key_exists', 'arrayKeyExists' or 'arraykeyExists'. Because of the performance impact and possible resolution conflicts this language feature needs to be disabled by default. This is not difficult to implement. It is only necessary to normalize function names: remove all but leading underscores and lower case the result. The likelihood of conflict is very small. This small change would allow coding teams to create a consistent code base based on 'their' guidelines. Motto: "Have it your way!". Best regards, Robert Cerny [1] https://wiki.php.net/start?do=register --------------010308060203070101040107--