Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66711 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31094 invoked from network); 19 Mar 2013 23:13:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2013 23:13:22 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:55461] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8A/80-26970-111F8415 for ; Tue, 19 Mar 2013 18:13:22 -0500 Received: from transformer.fritz.box (ppp-93-104-25-27.dynamic.mnet-online.de [93.104.25.27]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id B8A07651C3; Wed, 20 Mar 2013 00:13:18 +0100 (CET) User-Agent: K-9 Mail for Android In-Reply-To: References: <51432E01.7090502@mrclay.org> <51433530.5040707@gmail.com> <5147A64D.5030908@sugarcrm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Wed, 20 Mar 2013 00:13:20 +0100 To: Julien Pauli ,Stas Malyshev CC: PHP Developers Mailing List Message-ID: Subject: Re: [PHP-DEV] Could we kill call_user_func? From: johannes@schlueters.de (=?ISO-8859-1?Q?Johannes_Schl=FCter?=) Julien Pauli wrote: >On Tue, Mar 19, 2013 at 12:42 AM, Stas Malyshev >wrote: > >> Hi! >> >> > Also, AFAIR, call_user_func() doesn't work with functions using >> references >> > in args. >> >> Use call_user_func_array() for that, it supports refs. >> > >Isn't it since 5.3 or so ? Before 5.3 call_uer_func_array() could convert copied values in the array to references, something like "worked", while obviously being wrong. This was fixed. Anyways, both call_user_func() and call_user_func_array() have their place, one for doing dynamic stuff, secondly for compatibility, no need to get rid of those. Adding syntactical sugar for calling things is a different question, but a key element of the PHP language design is to have verbosity, so that even people who don't know all constructs have a chance to search for it. We're getting rid of this slowly (i.e. due to things like $a = [ ] ) but we houldn't loose this idea completely. johannes