PHPackages                             zorrow/thrift-parser-php - 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. zorrow/thrift-parser-php

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

zorrow/thrift-parser-php
========================

parse thrift file by php

v0.0.2(8y ago)4393MITPHP

Since Jul 31Pushed 8y ago1 watchersCompare

[ Source](https://github.com/wangwenbo/thrift-parser-php)[ Packagist](https://packagist.org/packages/zorrow/thrift-parser-php)[ RSS](/packages/zorrow-thrift-parser-php/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

thrift-parser-php
-----------------

[](#thrift-parser-php)

To parse thrift file to struct,support const、enum、exception、include、namespace、service、struct、typedef and union

### Example

[](#example)

ParserCal,ParserFunc are baisc functions.

initSubject function (Class ThriftParser) is to set the sets which will be dealed.

```
        $path = "./namespace.thrift";
        $parserCal = new ParserCal($path);
        $parserFunc = new ParserFunc($parserCal);

        $parser = new ThriftParser($parserFunc);
        $thriftNamespace = new ThriftNamespace($parserFunc);
        $parser->initSubject($thriftNamespace);

        $file = $parser->readThrift();
```

### Return

[](#return)

```
    [
        'namespace' => [
            'php' => [
                'serviceName'=>'SMS'
            ]
        ]
    ]
```

### Reference

[](#reference)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~51 days

Total

2

Last Release

3159d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b451b4582d0945ea00511cefe48f3c3d2c573932321a21fc09ac17eaedf5e6b?d=identicon)[wangwenbo](/maintainers/wangwenbo)

---

Top Contributors

[![zzorrow](https://avatars.githubusercontent.com/u/1937138?v=4)](https://github.com/zzorrow "zzorrow (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zorrow-thrift-parser-php/health.svg)

```
[![Health](https://phpackages.com/badges/zorrow-thrift-parser-php/health.svg)](https://phpackages.com/packages/zorrow-thrift-parser-php)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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