PHPackages                             imanghafoori/php-token-analyzer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. imanghafoori/php-token-analyzer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

imanghafoori/php-token-analyzer
===============================

Token analyzer utility for PHP

v1.0.76(1y ago)16535.6k↓14.5%34MITPHPPHP ^7.2|8.0.\*|8.1.\*|8.2.\*|8.3.\*CI failing

Since Jul 31Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/imanghafoori1/php_token_analyzer)[ Packagist](https://packagist.org/packages/imanghafoori/php-token-analyzer)[ Docs](https://github.com/imanghafoori1/php_token_analyzer)[ RSS](/packages/imanghafoori-php-token-analyzer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (93)Used By (4)

Php Code Analyzer
=================

[](#php-code-analyzer)

#### Reads and analyzes PHP code, just like PHP reflection but without executing it.

[](#reads-and-analyzes-php-code-just-like-php-reflection-but-without-executing-it)

This package is extracted from `laravel-microscope` package as a framework-agnostic, pure PHP package.

[![tests](https://github.com/imanghafoori1/php_token_analyzer/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/imanghafoori1/php_token_analyzer/actions/workflows/tests.yml)[![Latest Stable Version](https://camo.githubusercontent.com/be4b0e2eb286ef534ef0399ca7f9aa768fbf6854176276da309e312513e92b0f/68747470733a2f2f706f7365722e707567782e6f72672f696d616e676861666f6f72692f7068702d746f6b656e2d616e616c797a65722f762f737461626c65)](https://packagist.org/packages/imanghafoori/php_token_analyzer)[![Daily Downloads](https://camo.githubusercontent.com/200d85780cc87f36a3deca70279d75f0dc60cc5c35af44602c6c6a7010082fc9/68747470733a2f2f706f7365722e707567782e6f72672f696d616e676861666f6f72692f7068702d746f6b656e2d616e616c797a65722f642f6461696c79)](https://packagist.org/packages/imanghafoori/php_token_analyzer)[![Total Downloads](https://camo.githubusercontent.com/b856a8f80e20369ac4f7769f7e1ff9b420ee8966b14698a57acf7b618e7576b3/68747470733a2f2f706f7365722e707567782e6f72672f696d616e676861666f6f72692f7068702d746f6b656e2d616e616c797a65722f646f776e6c6f616473)](https://packagist.org/packages/imanghafoori/php_token_analyzer)[![Software License](https://camo.githubusercontent.com/7b9d0faf11330a88ea80a58ccf5491f699d5edf7ddac76ad40e2a9dc6a77fd76/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d726f756e642d737175617265)](LICENSE.md)

This is a pure PHP, framework-agnostic package which is extracted out of the Laravel-microscope package as a low-level dependency.

The functionality is heavily tested against different versions of PHP both manually and by automated tests.

### Installation:

[](#installation)

```
composer require imanghafoori/token-analyzer

```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

#### Contributing:

[](#contributing)

If you find an issue or have a better way to do something, feel free to open an issue or a pull request. If you use PHP-token-analyzer in your open-source project, create a pull request to provide its URL as a sample application in the README.md file.

#### Security:

[](#security)

If you discover any security-related issues, please email `imanghafoori1@gmail.com` instead of using the issue tracker.

```
A man will never fail unless he stops trying.

Albert Einstein

```

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance60

Regular maintenance activity

Popularity45

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 80.2% 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 ~18 days

Recently: every ~44 days

Total

91

Last Release

89d ago

Major Versions

v0.1.76 → v1.0.762024-06-08

PHP version history (8 changes)v0.1.0PHP ^7.1.3|8.0.\*

v0.1.6PHP ^7.1.3|8.0.\*|8.1.\*

v0.1.41PHP ^7.0|8.0.\*|8.1.\*|8.2.\*

v0.1.52PHP ^7.0|8.0.\*|8.1.\*|8.2.\*|8.3.\*

v0.1.55PHP ^7.1|8.0.\*|8.1.\*|8.2.\*|8.3.\*

v0.1.56PHP ^7.1.3|8.0.\*|8.1.\*|8.2.\*|8.3.\*

v0.1.72PHP ^7.2|8.0.\*|8.1.\*|8.2.\*|8.3.\*

v0.1.84PHP ^7.2|8.0.\*|8.1.\*|8.2.\*|8.3.\*|8.4.\*

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6961695?v=4)[Iman](/maintainers/imanghafoori1)[@imanghafoori1](https://github.com/imanghafoori1)

---

Top Contributors

[![imanghafoori1](https://avatars.githubusercontent.com/u/6961695?v=4)](https://github.com/imanghafoori1 "imanghafoori1 (174 commits)")[![alikhosravidev](https://avatars.githubusercontent.com/u/49164621?v=4)](https://github.com/alikhosravidev "alikhosravidev (41 commits)")[![hAz5](https://avatars.githubusercontent.com/u/14108756?v=4)](https://github.com/hAz5 "hAz5 (1 commits)")[![kevincobain2000](https://avatars.githubusercontent.com/u/629055?v=4)](https://github.com/kevincobain2000 "kevincobain2000 (1 commits)")

---

Tags

php-token-analyzer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/imanghafoori-php-token-analyzer/health.svg)

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

###  Alternatives

[spatie/laravel-event-sourcing

The easiest way to get started with event sourcing in Laravel

9003.7M26](/packages/spatie-laravel-event-sourcing)[voku/arrayy

Array manipulation library for PHP, called Arrayy!

4875.5M16](/packages/voku-arrayy)[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.4k423.9k30](/packages/mcp-sdk)[phpdocumentor/reflection

Reflection library to do Static Analysis for PHP Projects

12521.4M109](/packages/phpdocumentor-reflection)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[symfony/ai-platform

PHP library for interacting with AI platform provider.

51927.7k136](/packages/symfony-ai-platform)

PHPackages © 2026

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