Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66651 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63261 invoked from network); 15 Mar 2013 15:42:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2013 15:42:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.112 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.112 blu0-omc2-s37.blu0.hotmail.com Windows 2000 SP4, XP SP1 Received: from [65.55.111.112] ([65.55.111.112:4176] helo=blu0-omc2-s37.blu0.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8D/82-51298-95143415 for ; Fri, 15 Mar 2013 10:42:18 -0500 Received: from BLU0-SMTP323 ([65.55.111.72]) by blu0-omc2-s37.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 15 Mar 2013 08:42:15 -0700 X-EIP: [BVjPklbautGI/FW9rAERmNgT2XFGLyMj] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Received: from bob-weinands-imac.fritz.box ([78.141.134.76]) by BLU0-SMTP323.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 15 Mar 2013 08:42:13 -0700 Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) In-Reply-To: <51433530.5040707@gmail.com> Date: Fri, 15 Mar 2013 16:42:10 +0100 CC: PHP Developers Mailing List Content-Transfer-Encoding: quoted-printable References: <51432E01.7090502@mrclay.org> <51433530.5040707@gmail.com> To: =?iso-8859-1?Q?=C1ngel_Gonz=E1lez?= X-Mailer: Apple Mail (2.1499) X-OriginalArrivalTime: 15 Mar 2013 15:42:13.0890 (UTC) FILETIME=[AA26C620:01CE2193] Subject: Re: [PHP-DEV] Could we kill call_user_func? From: bobwei9@hotmail.com (Bob Weinand) Am 15.3.2013 um 15:50 schrieb =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. >>=20 >> Why can't we make $someCallable() always work? E.g. = http://3v4l.org/FLpAq >>=20 >> I understand the problem of $obj->foo() where ->foo is a callable >> property. The workaround could be: >>=20 >> ($obj->foo)(); >>=20 >> call_user_func() just seems so ugly now that we have nicer syntax in >> so many other areas. >>=20 >> Steve Clay > No. >=20 > What if I want to call functions with a variable number of arguments? >=20 > For instance, the common piece of a hook system implementation, where > the arguments of the functions called vary depending on the hook. call_user_func is not call_user_func_array call_user_func($func) is the same as $func(). In any way. Bob Weinand=