News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

C7Y:
Practical Uses for the PHP Tokenizer
August 20, 2008 @ 09:31:55

A new tutorial has been posted to php|architects C7Y community site looking at some practical uses of the PHP tokenizer to work with your source.

In this article we take a look at the PHP tokenizer and its potential at analyzing and processing PHP source code. We will build several working examples, which you can start using and extending for your own purposes.

The author, Stan Vassilev, explains what the tokenizer is for, how it parses the code (via a lexer) and how to get at the tokens that are created. He uses the token_get_all and token_name functions to get the information and creates a wrapper class around them to strip whitespace and comments.

1 comment voice your opinion now!
tokenizer practical use tutorial strip whitespace filter class


blog comments powered by Disqus

Similar Posts

MaltBlue.com: Zend Form Mastery with Zend Config - Part 1, Custom Filter Paths

Phil Sturgeon's Blog: Video: Set up a REST API with CodeIgniter

Matthew Turland's Blog: Scaling Zend_Form

Zend Developer Zone: Indexing Email Messages with PHP, Zend Lucene and Sphinx

Christian Wenz's Blog: Installing PHP on Windows 7


Community Events





Don't see your event here?
Let us know!


code configure threedevsandamaybe install interview developer podcast symfony2 laravel community list language testing framework introduction unittest series release opinion refactor

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework