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/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php