Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70635 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91706 invoked from network); 14 Dec 2013 08:23:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Dec 2013 08:23:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=mike.php.net@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mike.php.net@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.180 as permitted sender) X-PHP-List-Original-Sender: mike.php.net@gmail.com X-Host-Fingerprint: 209.85.217.180 mail-lb0-f180.google.com Received: from [209.85.217.180] ([209.85.217.180:47006] helo=mail-lb0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/61-11187-5851CA25 for ; Sat, 14 Dec 2013 03:23:34 -0500 Received: by mail-lb0-f180.google.com with SMTP id x18so152358lbi.11 for ; Sat, 14 Dec 2013 00:23:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=x/UAbDXI4U2hhWtBJVax7vrcytTWAcnwKBItHu+LPnw=; b=VdBV5nT4S5clCXhRbryJdGIvxsLjOfGB2hZ0zx1OmPBAJf/SwMSGzcg6AsVa4sn7Xo pdM0NKXbNLAt3ezKyhus9Z8OvZFeEi/6AVN6vObZ8dxbTPcOCtesmy5zeEC8JBs4qtjO GNHkck6KNK0VUpTxxB44yl7OZSadjywTcHc2XydkMfDhUn+tmvQVukMmllo5pOvWZROE gZfP7uAoqOmaEN7Ew5L7PVSLoagoKYS+nd4Clna/xVBkoTqjpb3QGxh51c2llbNhz+8l F9BwvNEQxrqPayLwf3edAN3eExnxMNr96ZvEaHC19Yulo59TJEs+9bLjYnQ3JueCu1XO MjrQ== MIME-Version: 1.0 X-Received: by 10.112.159.132 with SMTP id xc4mr598204lbb.62.1387009410186; Sat, 14 Dec 2013 00:23:30 -0800 (PST) Sender: mike.php.net@gmail.com Received: by 10.114.197.35 with HTTP; Sat, 14 Dec 2013 00:23:29 -0800 (PST) Received: by 10.114.197.35 with HTTP; Sat, 14 Dec 2013 00:23:29 -0800 (PST) In-Reply-To: <52ABFE84.8010404@cerny-online.com> References: <52ABFE84.8010404@cerny-online.com> Date: Sat, 14 Dec 2013 09:23:29 +0100 X-Google-Sender-Auth: ioPvhtnf8yOCC-BeQsDpRaSb8R0 Message-ID: To: Robert Cerny Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c3ddd631c1dd04ed7a4bf8 Subject: Re: [PHP-DEV] Flexible function naming From: mike@php.net (Michael Wallner) --001a11c3ddd631c1dd04ed7a4bf8 Content-Type: text/plain; charset=UTF-8 On Dec 14, 2013 7:45 AM, "Robert Cerny" wrote: > > 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. Yes one cannot register. > 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. Oh, I think this is not the best example, but in 5.6 you can achieve that with the new 'use function' feature. > 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!". No. > > Best regards, > > Robert Cerny > > [1] https://wiki.php.net/start?do=register --001a11c3ddd631c1dd04ed7a4bf8--