Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90653 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8364 invoked from network); 15 Jan 2016 04:00:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2016 04:00:45 -0000 X-Host-Fingerprint: 90.212.141.145 unknown Received: from [90.212.141.145] ([90.212.141.145:4176] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/20-05337-CEE68965 for ; Thu, 14 Jan 2016 23:00:44 -0500 Message-ID: <3F.20.05337.CEE68965@pb1.pair.com> To: internals@lists.php.net References: <77.F6.12097.81D2C865@pb1.pair.com> Date: Fri, 15 Jan 2016 03:59:47 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 90.212.141.145 Subject: Re: [PHP-DEV] Re: [RFC] Normalize token_get_all() output (with flag) From: ajf@ajf.me (Andrea Faulds) Hi Sara, Sara Golemon wrote: > How does this sound? > 1. Keep the current RFC basically as is. It's a minor addition to > token_get_all() which can be slotted into existing code to improve > readability, but offers little advantage beyond that. > 2. Make a new extension to prototype this PhpToken class outside of > the php-src tree, add all the extra goodies we want (array of token > return, iterator of token return, extra info, limited info, etc...) > 3. When this extension is good and solid, propose merging into core. > > I had reserved the github.com/phplang project for the specification, > but didn't end up using it. We can share a repo there if you'd like. Like Stas, I think this sounds good. I might even look over what's created, if I find the time. Regarding arrays versus iterators, you can create the former from the latter, but not the other way around. I'd go for just having an iterator and no array.. It maps better to how PHP actually works, anyway. But enough discussion here, I shall await your git repository... Thanks! -- Andrea Faulds https://ajf.me/