PHPackages                             nikic/phlexy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. nikic/phlexy

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

nikic/phlexy
============

Lexing experiments in PHP

v0.2(6y ago)162570.9k—6.2%11[1 PRs](https://github.com/nikic/Phlexy/pulls)13BSD-3-ClausePHPPHP ^7.1

Since Mar 13Pushed 4y ago12 watchersCompare

[ Source](https://github.com/nikic/Phlexy)[ Packagist](https://packagist.org/packages/nikic/phlexy)[ RSS](/packages/nikic-phlexy/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (13)

Phlexy
======

[](#phlexy)

This project is a followup to [my post on fast lexing in PHP](http://nikic.github.com/2011/10/23/Improving-lexing-performance-in-PHP.html). It contains a few lexer implementations (both stateless and stateful) and related performance tests.

Usage
-----

[](#usage)

Lexers are created from a lexer definition using a factory class.

For example, if you want to create a MARK based stateless CSV lexer, you can use the following code:

```
