Re: Re: [RFC] Normalize token_get_all() output (with flag)

From: Date: Fri, 15 Jan 2016 03:59:47 +0000
Subject: Re: Re: [RFC] Normalize token_get_all() output (with flag)
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-90653@lists.php.net to get a copy of this message
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/

« previous php.internals (#90653) next »