Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77944 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74808 invoked from network); 14 Oct 2014 03:35:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Oct 2014 03:35:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@mabe.berlin; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@mabe.berlin; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mabe.berlin from 80.237.132.167 cause and error) X-PHP-List-Original-Sender: php@mabe.berlin X-Host-Fingerprint: 80.237.132.167 wp160.webpack.hosteurope.de Received: from [80.237.132.167] ([80.237.132.167:42355] helo=wp160.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/20-06771-BE99C345 for ; Mon, 13 Oct 2014 23:35:11 -0400 Received: from dslb-178-012-112-159.178.012.pools.vodafone-ip.de ([178.12.112.159] helo=[192.168.178.30]); authenticated by wp160.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) id 1Xdst6-0002dN-1U; Tue, 14 Oct 2014 05:35:04 +0200 Message-ID: <543C99E7.5040608@mabe.berlin> Date: Tue, 14 Oct 2014 05:35:03 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Marco Pivetta CC: PHP Internals List References: <5439B266.8070300@gmail.com> <543C1805.9000700@mabe.berlin> <543C257D.7040006@mabe.berlin> In-Reply-To: Content-Type: multipart/alternative; boundary="------------060600070407080004010407" X-bounce-key: webpack.hosteurope.de;php@mabe.berlin;1413257711;b61f30d5; Subject: Re: [PHP-DEV] Deprecation of func_get_args(), call_user_func_array() and related API From: php@mabe.berlin (Marc Bennewitz) --------------060600070407080004010407 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 13.10.2014 22:26, Marco Pivetta wrote: > On 13 October 2014 21:18, Marc Bennewitz > wrote: > > > On 13.10.2014 20:48, Marco Pivetta wrote: >> On 13 October 2014 20:20, Marc Bennewitz > > wrote: >> >> >> On 13.10.2014 02:45, Marco Pivetta wrote: >> >> Your implementation of "userland_call_user_func" doesn't have >> the same >> visibility as "call_user_func[_array]": >> http://3v4l.org/lNgub >> >> >> Interesting: this seems to show that it's even more magic than I >> expected. >> >> Here's just a hacked-together example, just to show that it can >> be done in userland as well (there may be better ways): >> http://3v4l.org/QuQM1#v560 > Now you have the opposite issue - you are able to call > private/protected methods but you shouldn't: > http://3v4l.org/rgmh8#v560 > > > Good catch, but I'm not trying to build a complete solution in a gist: > if I do, then I'll just make a lib and include all existing `.phpt` > tests related to `call_user_func`, no? :-) > Just a revision of the userland version, for fun: > http://3v4l.org/6IKKl#v560 Sure, but it shows that it's not a simple two-liner to have a well working solution in userland. The more complicated it is the more error-prone it will be and btw. slow down. > > Marco Pivetta > > http://twitter.com/Ocramius > > http://ocramius.github.com/ --------------060600070407080004010407--