Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70896 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57951 invoked from network); 28 Dec 2013 06:58:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Dec 2013 06:58:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.44 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.44 mail-la0-f44.google.com Received: from [209.85.215.44] ([209.85.215.44:57128] helo=mail-la0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 68/10-56949-9867EB25 for ; Sat, 28 Dec 2013 01:58:18 -0500 Received: by mail-la0-f44.google.com with SMTP id ep20so4620116lab.17 for ; Fri, 27 Dec 2013 22:58:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=cdjcAqQaO5P8HHG/eTjO0mjSVpEJk5AVjoKXqC5PIJE=; b=cB08HpXuQrNoO6GE3moQ3CPXTLcRIvkkTknUY0B0Pk5xWTWxZATAa+LY76IQvqAzI+ XiBoSyvR+Z43W/cmLxoHE6tc5TyVbJFqbET8MQeqFzY58/ZbFDJVxc5GykV+K8TWNdRT yqWmZFH4R8WEJvFW8R+mEILQp2oDzAcTcSegQARXHDBVMnOF8co6ftjnq6CJnfvzpNZC 904uDje3QIgjj4agaoQ4kZBFLSXtatnrAbZBQnTeGZiqxuKjqPewJcYjCAjHM/DMucmq D8PdEY3TLD8262hp011eYVRgAanWZM3K4yMM7gFxP90FomMJSdAcdOaTZ8YVfwTYGnIo 02bA== X-Received: by 10.112.172.69 with SMTP id ba5mr5088867lbc.55.1388213894759; Fri, 27 Dec 2013 22:58:14 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.6.68 with HTTP; Fri, 27 Dec 2013 22:57:34 -0800 (PST) Date: Sat, 28 Dec 2013 15:57:34 +0900 X-Google-Sender-Auth: O1M7eHpoIXjoWtQIEZewmX6sEmk Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c2340411c98c04ee92bc67 Subject: [PHP6] Function name consistency From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c2340411c98c04ee92bc67 Content-Type: text/plain; charset=UTF-8 Hi all, 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? Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c2340411c98c04ee92bc67--