PHPackages                             phplrt/lexer - 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. phplrt/lexer

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

phplrt/lexer
============

The phplrt lexer library that can be used for scanners implementation using PCRE

3.7.5(1y ago)3156.6k—1.2%8MITPHPPHP ^8.1CI passing

Since May 5Pushed 2mo ago1 watchersCompare

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

READMEChangelogDependencies (8)Versions (62)Used By (8)

 [![Phplrt](https://avatars2.githubusercontent.com/u/49816277?s=128)](https://phplrt.org)

Lexer
-----

[](#lexer)

This is a subtree split of the phplrt lexer component.

### Resources

[](#resources)

- [Documentation](https://github.com/phplrt/phplrt/blob/master/README.md)
- [Repository](https://github.com/phplrt/phplrt)
    - [Issues](https://github.com/phplrt/phplrt/issues)
    - [Pull Requests](https://github.com/phplrt/phplrt/pulls)

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance63

Regular maintenance activity

Popularity36

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Recently: every ~14 days

Total

61

Last Release

558d ago

Major Versions

1.1.0 → 2.0.02019-09-08

2.3.6 → 3.0.02020-03-05

PHP version history (4 changes)1.0.0PHP &gt;=7.1.3

3.0.0PHP &gt;=7.4

3.1.8PHP ^7.4|^8.0

3.5.2PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/150420?v=4)[Ruslan Sharipov](/maintainers/Serafim)[@serafim](https://github.com/serafim)

---

Top Contributors

[![SerafimArts](https://avatars.githubusercontent.com/u/2461257?v=4)](https://github.com/SerafimArts "SerafimArts (144 commits)")[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (18 commits)")

---

Tags

lexerpcrepcre2phplrtregextokenizerstreamlexertokenregextokenizerparsingscanner

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/phplrt-lexer/health.svg)

```
[![Health](https://phpackages.com/badges/phplrt-lexer/health.svg)](https://phpackages.com/packages/phplrt-lexer)
```

###  Alternatives

[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[rajentrivedi/tokenizer-x

TokenizerX calculates required tokens for given prompt

91214.0k3](/packages/rajentrivedi-tokenizer-x)[strscan/strscan

Simple string tokenizer for lexical scanning operations

13146.8k2](/packages/strscan-strscan)[kendall-hopkins/formal-theory

FormalTheory is a library that allows for manipulation and conversion of NFAs, DFAs and Regular Expressions.

335.4k](/packages/kendall-hopkins-formal-theory)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
