Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54455 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5019 invoked from network); 8 Aug 2011 07:45:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2011 07:45:08 -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:56918] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/20-04011-2049F3E4 for ; Mon, 08 Aug 2011 03:45:07 -0400 Received: from [192.168.2.230] (ppp-93-104-62-49.dynamic.mnet-online.de [93.104.62.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 3E72877AAE; Mon, 8 Aug 2011 09:45:03 +0200 (CEST) To: ivan.enderlin@hoa-project.net Cc: internals@lists.php.net In-Reply-To: <4E3F8D43.7000404@hoa-project.net> References: <4E3F8D43.7000404@hoa-project.net> Content-Type: text/plain; charset="UTF-8" Date: Mon, 08 Aug 2011 09:45:01 +0200 Message-ID: <1312789501.1485.3.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Add \Countable support to \Closure From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Mon, 2011-08-08 at 09:16 +0200, Ivan Enderlin @ Hoa wrote: > Hi Internals, > > I would like to suggest you a new feature (for PHP5.4 or maybe next). > The idea is to implement the \Countable interface into closures to > easily count the arguments number. NO! One could add a getParmNo() or such if really needed while I think reflection is better (as it also gives parameter information about required/optional and type "hints") Countable implies ArrayAccess or such. johannes