Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100375 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78200 invoked from network); 5 Sep 2017 03:00:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2017 03:00:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=php-lists@koalephant.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php-lists@koalephant.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain koalephant.com designates 206.123.115.54 as permitted sender) X-PHP-List-Original-Sender: php-lists@koalephant.com X-Host-Fingerprint: 206.123.115.54 mail1.25mail.st Received: from [206.123.115.54] ([206.123.115.54:38028] helo=mail1.25mail.st) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/62-04538-8531EA95 for ; Mon, 04 Sep 2017 23:00:43 -0400 Received: from [10.0.1.22] (unknown [49.48.241.143]) by mail1.25mail.st (Postfix) with ESMTPSA id 255AB60494; Tue, 5 Sep 2017 03:00:32 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) X-Mailer: iPhone Mail (14G60) In-Reply-To: Date: Tue, 5 Sep 2017 10:00:28 +0700 Cc: Rowan Collins , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: <6E01ED67-4E2E-4BBA-93F5-6C4E3BB50CDE@koalephant.com> References: <4CFF3E6E-5B9B-49CE-9603-33170CD63421@gmail.com> To: Dan Ackroyd Subject: Re: [PHP-DEV] [RFC][Discussion] Consistent callables From: php-lists@koalephant.com (Stephen Reay) Sent from my iPhone > On 5 Sep 2017, at 03:05, Dan Ackroyd wrote: >=20 > Stephen Reay wrote: >> Regarding the big change you suggest, making protected/private methods re= turn false unless a new third parameter is true in is_callable(): >> I think you need to make your intention a *lot* clearer >=20 >> On 29 May 2017 at 12:01, Rowan Collins wrote: >> Regarding is_callable, ....could lead to some very confusing bugs. IMO, w= hen BC breaks are necessary, they should be big and obvious so people spot a= nd fix them. >=20 >=20 > Most of the feedback I got was how modifying the existing is_callable > function was dumb, so I've updated the RFC, and dropped the idea of > modifying the existing is_callable function. >=20 > That function will stay as it is, and will be used to determine if a > variable can be called in the current scope, through either direct > invocation or call_user_func(). >=20 > The RFC instead now proposes a separate function of is_callable_type, > to determine if a variable can be used as callable in all scopes, and > so will pass the callable type check for parameters and return types. >=20 > cheers > Dan > Ack >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 Hi Dan, I appreciate that you've listened to our feedback!=20 As a userland-only dev I'm not really familiar with the trade offs/gotchas i= nherent to how parameters are handled in the core. Could you/someone explain= /identify why a new function is better than converting the `$syntaxonly` boo= l parameter into a bitmask of CALLABLE_* constants, which treats Boolean tru= e as CALLABLE_SYNTAXONLY for bc purposes? Cheers Stephen=20 Sent from my iPhone