Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84418 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39775 invoked from network); 7 Mar 2015 22:48:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Mar 2015 22:48:35 -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.214.171 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.214.171 mail-ob0-f171.google.com Received: from [209.85.214.171] ([209.85.214.171:36344] helo=mail-ob0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/70-34956-1408BF45 for ; Sat, 07 Mar 2015 17:48:34 -0500 Received: by obcva2 with SMTP id va2so8667447obc.3 for ; Sat, 07 Mar 2015 14:48:29 -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:cc:content-type; bh=R9C8tqBm7hHsqJ6qgatCtvY0ITRUq1CBUocFesoRcX8=; b=nwe1zeskR6BAi4O1cfAJ7IUvGDQ3oeQ++AGozGQQMeXQ19OKPLagomEO7SFpHFCCYX d30ZrS8KlXbwzMZvVc2A3gxAq+yygPsd9yj6A6QqgrDt39FTuzP4ZsGnyaWOIKWI63gv FjCtS49pbW3Pd93FvTdp+Bp8RZbWCsUE2fgjnT+yATizYJBRL1KNXsu2tA6sgBYhK/uM +KWaf+z+it2P/JQaC3dNFJf8oC/I9E7va2ltWPNQYLeDo+bL+jajFx3+vytBAaS0aU2v Z++eu19Oj6FMe6krMk1hEMUEML5Xb78acYTWE/kvIvzhFBjyviLyl1uOKu8yRXmNQ90T xyIw== X-Received: by 10.182.39.227 with SMTP id s3mr7653319obk.44.1425768509910; Sat, 07 Mar 2015 14:48:29 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.202.58.2 with HTTP; Sat, 7 Mar 2015 14:47:48 -0800 (PST) In-Reply-To: <54FB44EE.6000704@gmail.com> References: <54F83061.60108@seld.be> <54FB44EE.6000704@gmail.com> Date: Sun, 8 Mar 2015 07:47:48 +0900 X-Google-Sender-Auth: mJh2yb2rjoISDapQPXBGsrxmP_E Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c2e9e890b55f0510ba9916 Subject: Re: [PHP-DEV] Re: [RFC] [DISCUSSION] Consistent Function Names From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c2e9e890b55f0510ba9916 Content-Type: text/plain; charset=UTF-8 Hi Rowan, On Sun, Mar 8, 2015 at 3:35 AM, Rowan Collins wrote: > On 06/03/2015 23:03, Yasuo Ohgaki wrote: > >> We have a lot of array_u*() functions such as >> >> http://php.net/manual/en/function.array-uintersect-uassoc.php >> array array_uintersect_uassoc ( array $array1 , array $array2 [, array >> $... >> ], callable $value_compare_func , callable $key_compare_func ) >> this can be consolidated to >> http://php.net/manual/en/function.array-intersect-assoc.php >> array array_intersect_assoc ( array $array1 , array $array2 [, array $... >> ] >> ) >> >> All of these has callback the end of parameters. These may be >> consolidated. >> I'll add this to the RFC if this is preferred. >> > > Those functions both take any number of arguments, so given a function > call with 4 arguments, you can't know if that's 4 arrays, or 2 arrays and 2 > callbacks. Don't forget that array($class_name, $method_name) is a valid > callback, so you can't judge it by the type of the arguments either. Thank you for heads up. If I detect array($class_name, $method_name) as callback, there could be unintended callback calls. Since we have been deprecated similar call_user_method()/call_user_method_array(), we may deprecate array callbacks for u* functions, then consolidate in the future, perhaps PHP8. I don't mind add this to the RFC. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c2e9e890b55f0510ba9916--