Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71416 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66677 invoked from network); 22 Jan 2014 22:18:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2014 22:18:11 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-la0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:62837] helo=mail-la0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/68-13626-1A340E25 for ; Wed, 22 Jan 2014 17:18:10 -0500 Received: by mail-la0-f42.google.com with SMTP id hr13so860514lab.29 for ; Wed, 22 Jan 2014 14:18:05 -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:from:date:message-id :subject:to:content-type; bh=4edyZ4/uiRwMh56VMHD6xICTRnBfNEnB1uUrW1bqVZg=; b=SpRVAMhpiuRjsEJo1peXzsm4TtlUYvCcz4F270tE+tvnFsnB5C4t5AsWXLoimnq4hs gzBFA3Ns1mvTcW80rVFt8Mm0w7du6+0D6RHvylx5VDFzDaF9ONNDWjn8/zWVZXuzHL6/ z2nj31PpJ8UqFFWsEqwxkK8lFAnCut4p+tE2RmLePWpXe4a8gscGFhPB2aKCufXur9tr FHBq36ehI85rw67mw5hubWo86LGvRglM9BSvjLKcBEo2XcCMMUoZfFl728OyPC5okSkS qZwqkNWqjRKn9w4qUhBwL4D3+n477W3IC5FNsdrRdgB4mw/fDV3y8V1lWM64fKPRngbS bk0g== X-Received: by 10.112.135.165 with SMTP id pt5mr2555386lbb.33.1390429085643; Wed, 22 Jan 2014 14:18:05 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.132.134 with HTTP; Wed, 22 Jan 2014 14:17:25 -0800 (PST) In-Reply-To: References: Date: Thu, 23 Jan 2014 07:17:25 +0900 X-Google-Sender-Auth: pCGdiwQAcgyGkJVUp9BYDZIu3HE Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e01227c0cbc3a1a04f0967fcf Subject: Re: [PHP6] Function name consistency From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e01227c0cbc3a1a04f0967fcf Content-Type: text/plain; charset=UTF-8 On Sat, Dec 28, 2013 at 3:57 PM, Yasuo Ohgaki wrote: > I know this has been discussed before, but I'll try again. > We have following coding standard > > 1. Function names for user-level functions should be enclosed with in > the PHP_FUNCTION() macro. They should be in lowercase, with words > underscore delimited, with care taken to minimize the letter count. > Abbreviations should not be used when they greatly decrease the > readability of the function name itself:: > > Good: > 'mcrypt_enc_self_test' > 'mysql_list_fields' > > Ok: > 'mcrypt_module_get_algo_supported_key_sizes' > (could be 'mcrypt_mod_get_algo_sup_key_sizes'?) > 'get_html_translation_table' > (could be 'html_get_trans_table'?) > > Bad: > 'hw_GetObjectByQueryCollObj' > 'pg_setclientencoding' > 'jf_n_s_i' > > https://github.com/php/php-src/blob/master/CODING_STANDARDS > > > 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, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e01227c0cbc3a1a04f0967fcf--