Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66646 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49945 invoked from network); 15 Mar 2013 14:55:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2013 14:55:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=keisial@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=keisial@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.178 as permitted sender) X-PHP-List-Original-Sender: keisial@gmail.com X-Host-Fingerprint: 74.125.82.178 mail-we0-f178.google.com Received: from [74.125.82.178] ([74.125.82.178:52189] helo=mail-we0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/32-59234-47633415 for ; Fri, 15 Mar 2013 09:55:49 -0500 Received: by mail-we0-f178.google.com with SMTP id o45so3177751wer.23 for ; Fri, 15 Mar 2013 07:55:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=mU7HMQYrLBkNRZygiWWACkShzam56M8SyQhh7hxgeY4=; b=X8jec7I8hu+61nBTOBe9KYLbf0VkBgXCuVaYBe6L3ulCP1t9TQr2TS5rgJtxAUwIP0 YvXOm5onskC+npqJET148xeVjIdFeQfLgBchAy9ae0QyajbAzfFsWhnCpqGqbdUrmVDq w6izOYviCMWHdaLx9VWVm0oJchhVLMoavqujngLwr/GNDEY31sWMPhSsKE7CSUunBQG2 Fz7owEQCbYSXAJhXt4/8gOJbT98aSBx0dP0rGhrjdpuooLwEIg0xrtxRbzjtH3mn+XC2 ckvRuDoa4UM/z6eL6O5pZkUhXSX5ZjROYb59vvXozOSJxcJNe+BL8zKxq1fdEiKKoCKt GWzg== X-Received: by 10.194.60.195 with SMTP id j3mr11464232wjr.33.1363359345448; Fri, 15 Mar 2013 07:55:45 -0700 (PDT) Received: from [192.168.1.26] (129.red-80-28-72.adsl.dynamic.ccgg.telefonica.net. [80.28.72.129]) by mx.google.com with ESMTPS id k5sm3646376wiy.5.2013.03.15.07.55.43 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Mar 2013 07:55:44 -0700 (PDT) Message-ID: <51433530.5040707@gmail.com> Date: Fri, 15 Mar 2013 15:50:24 +0100 User-Agent: Thunderbird MIME-Version: 1.0 To: Steve Clay CC: PHP Internals References: <51432E01.7090502@mrclay.org> In-Reply-To: <51432E01.7090502@mrclay.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Could we kill call_user_func? From: keisial@gmail.com (=?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?=) On 15/03/13 15:19, Steve Clay wrote: > I'm sure this question has been discussed before, so if anyone can > point to me to links or briefly recap I'd appreciate it. > > Why can't we make $someCallable() always work? E.g. http://3v4l.org/FLpAq > > I understand the problem of $obj->foo() where ->foo is a callable > property. The workaround could be: > > ($obj->foo)(); > > call_user_func() just seems so ugly now that we have nicer syntax in > so many other areas. > > Steve Clay No. What if I want to call functions with a variable number of arguments? For instance, the common piece of a hook system implementation, where the arguments of the functions called vary depending on the hook.