Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28426 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89025 invoked by uid 1010); 19 Mar 2007 15:16:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89010 invoked from network); 19 Mar 2007 15:16:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2007 15:16:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=jon@csh.rit.edu; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jon@php.net; sender-id=unknown Received-SPF: pass (pb1.pair.com: domain csh.rit.edu designates 129.21.60.19 as permitted sender) X-PHP-List-Original-Sender: jon@csh.rit.edu X-Host-Fingerprint: 129.21.60.19 whitefox.csh.rit.edu Received: from [129.21.60.19] ([129.21.60.19:58293] helo=whitefox.csh.rit.edu) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/3F-33476-939AEF54 for ; Mon, 19 Mar 2007 10:16:10 -0500 Received: from localhost (localhost [127.0.0.1]) by whitefox.csh.rit.edu (Postfix) with ESMTP id D5A2511442 for ; Mon, 19 Mar 2007 11:16:06 -0400 (EDT) Received: from whitefox.csh.rit.edu ([127.0.0.1]) by localhost (whitefox.csh.rit.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 49562-02 for ; Mon, 19 Mar 2007 11:16:06 -0400 (EDT) Received: from scorn.csh.rit.edu (scorn.csh.rit.edu [129.21.60.26]) by whitefox.csh.rit.edu (Postfix) with ESMTP id 9137811438 for ; Mon, 19 Mar 2007 11:16:06 -0400 (EDT) Received: by scorn.csh.rit.edu (Postfix, from userid 37404) id 7411950D84; Mon, 19 Mar 2007 11:16:06 -0400 (EDT) Date: Mon, 19 Mar 2007 11:16:06 -0400 To: internals@lists.php.net Message-ID: <20070319151606.GA28082@csh.rit.edu> Mail-Followup-To: internals@lists.php.net References: <86478A67-DCA2-4000-9EF0-DA4338E8389B@omniti.com> <24F7763B-824F-42B9-B7DA-C831BCF37D04@omniti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: amavisd-new at csh.rit.edu Subject: Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP From: jon@php.net (Jon Parise) On Sun, Mar 18, 2007 at 08:48:31PM -0400, Wez Furlong wrote: > Updated patch at http://pastebin.ca/400952 This is interesting. I'm not sure I'll ever use it (I prefer named functions), but it's a purely optional and folks seem to want something like this. One comment on the patch itself: static unsigned int anon_count; I think you should provide an initial value (0?) for this static counter. Also, you should protect against wrap-around (which, while improbably, is possible). Alternatively, you could change the anonymous function naming scheme to something like __zend_anon_FILE_LINE_COLUMN, but that could be an unnecessary waste of string memory. -- Jon Parise (jon of php.net) :: The PHP Project (http://www.php.net/)