Hi! > Nice! I'll say one thing though: If we're going to introduce a class, > I'm tempted to leave token_get_all alone (or at least limit its > changes to what's in the current porposal), and have the PhpToken > class implement its own static method to do the same thing. This
I like this idea better. It is also conceptually simpler - you just have one class to deal with. > 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. Sounds great! I wonder if it'd be possible to make a real streaming iterator? That would be so nice. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php