PHPackages                             megao-phpunit/php-token-stream - 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. megao-phpunit/php-token-stream

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

megao-phpunit/php-token-stream
==============================

Wrapper around PHP's tokenizer extension.

4.0.4(5y ago)145BSD-3-ClausePHP ^7.3 || ^8.0

Since Sep 23Compare

[ Source](https://github.com/gkfsunshine/php-token-stream)[ Packagist](https://packagist.org/packages/megao-phpunit/php-token-stream)[ Docs](https://github.com/sebastianbergmann/php-token-stream/)[ GitHub Sponsors](https://github.com/sebastianbergmann)[ RSS](/packages/megao-phpunit-php-token-stream/feed)WikiDiscussions Synced 1mo ago

READMEChangelogDependencies (1)Versions (38)Used By (0)

### README not available

The README for this package hasn't been synced yet. View it on [GitHub](https://github.com/gkfsunshine/php-token-stream).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 88.5% 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 ~83 days

Recently: every ~42 days

Total

37

Last Release

1995d ago

Major Versions

1.4.11 → 2.0.02017-08-03

1.4.12 → 3.0.02018-02-01

3.1.1 → 4.0.02020-02-07

PHP version history (7 changes)1.1.4PHP &gt;=5.2.7

1.1.5PHP &gt;=5.3.3

2.0.0PHP ^7.0

3.0.0PHP ^7.1

4.0.0PHP ^7.3

4.0.3PHP ^7.3 || ^8.0

3.1.x-devPHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/66b2eee77d3b1cbf61f97f37cf348f3853d27a82ee8b770171753a0b3bb2739c?d=identicon)[gkfsunshine](/maintainers/gkfsunshine)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (324 commits)")[![edorian](https://avatars.githubusercontent.com/u/247397?v=4)](https://github.com/edorian "edorian (9 commits)")[![christeredvartsen](https://avatars.githubusercontent.com/u/25402?v=4)](https://github.com/christeredvartsen "christeredvartsen (6 commits)")[![whatthejeff](https://avatars.githubusercontent.com/u/306525?v=4)](https://github.com/whatthejeff "whatthejeff (6 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (2 commits)")[![sun](https://avatars.githubusercontent.com/u/41992?v=4)](https://github.com/sun "sun (2 commits)")[![ivyhjk](https://avatars.githubusercontent.com/u/12478859?v=4)](https://github.com/ivyhjk "ivyhjk (2 commits)")[![orklah](https://avatars.githubusercontent.com/u/9605520?v=4)](https://github.com/orklah "orklah (2 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (2 commits)")[![rayrutjes](https://avatars.githubusercontent.com/u/5570853?v=4)](https://github.com/rayrutjes "rayrutjes (1 commits)")[![fredemmott](https://avatars.githubusercontent.com/u/360927?v=4)](https://github.com/fredemmott "fredemmott (1 commits)")[![slashmili](https://avatars.githubusercontent.com/u/585764?v=4)](https://github.com/slashmili "slashmili (1 commits)")[![StephenClouse](https://avatars.githubusercontent.com/u/468025?v=4)](https://github.com/StephenClouse "StephenClouse (1 commits)")[![tamcap](https://avatars.githubusercontent.com/u/5289937?v=4)](https://github.com/tamcap "tamcap (1 commits)")[![tomzx](https://avatars.githubusercontent.com/u/188960?v=4)](https://github.com/tomzx "tomzx (1 commits)")[![gkfsunshine](https://avatars.githubusercontent.com/u/30225986?v=4)](https://github.com/gkfsunshine "gkfsunshine (1 commits)")[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (1 commits)")[![loilo](https://avatars.githubusercontent.com/u/1922624?v=4)](https://github.com/loilo "loilo (1 commits)")[![mazzcris](https://avatars.githubusercontent.com/u/6614577?v=4)](https://github.com/mazzcris "mazzcris (1 commits)")[![oker1](https://avatars.githubusercontent.com/u/431237?v=4)](https://github.com/oker1 "oker1 (1 commits)")

---

Tags

tokenizer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/megao-phpunit-php-token-stream/health.svg)

```
[![Health](https://phpackages.com/badges/megao-phpunit-php-token-stream/health.svg)](https://phpackages.com/packages/megao-phpunit-php-token-stream)
```

###  Alternatives

[yethee/tiktoken

PHP version of tiktoken

1583.1M15](/packages/yethee-tiktoken)[gioni06/gpt3-tokenizer

PHP package for Byte Pair Encoding (BPE) used by GPT-3.

85537.5k8](/packages/gioni06-gpt3-tokenizer)[rajentrivedi/tokenizer-x

TokenizerX calculates required tokens for given prompt

91214.0k3](/packages/rajentrivedi-tokenizer-x)[nicoswd/php-rule-parser

Rule Engine - Rule Parser &amp; Evaluator

13078.6k7](/packages/nicoswd-php-rule-parser)[jeremeamia/functionparser

Function parser for PHP functions, methods, and closures

48169.7k6](/packages/jeremeamia-functionparser)[danny50610/bpe-tokeniser

PHP port for openai/tiktoken (most)

10422.0k1](/packages/danny50610-bpe-tokeniser)

PHPackages © 2026

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