PHPackages                             google/flatbuffers - 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. google/flatbuffers

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

google/flatbuffers
==================

FlatBuffers for PHP

v25.12.19(5mo ago)25.7k134.7k—7.5%3.5k[79 PRs](https://github.com/google/flatbuffers/pulls)3Apache-2.0C++PHP &gt;=5.4CI failing

Since Feb 3Pushed 1mo ago628 watchersCompare

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

READMEChangelog (10)DependenciesVersions (47)Used By (3)

[![logo](https://camo.githubusercontent.com/d513625b969e5cd79410501ccd92287f41dc28c5ded9d5cc442dfc2a7293b0a2/68747470733a2f2f666c6174627566666572732e6465762f6173736574732f666c6174627566666572735f6c6f676f2e737667)](https://camo.githubusercontent.com/d513625b969e5cd79410501ccd92287f41dc28c5ded9d5cc442dfc2a7293b0a2/68747470733a2f2f666c6174627566666572732e6465762f6173736574732f666c6174627566666572735f6c6f676f2e737667) FlatBuffers
=============================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-flatbuffers)

[![Build status](https://github.com/google/flatbuffers/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/google/flatbuffers/actions/workflows/build.yml/badge.svg?branch=master)[![BuildKite status](https://camo.githubusercontent.com/bcad1007bb259a9c0d22d10bdafa3871a3a74cf4e0c557aa31b95594b776b438/68747470733a2f2f62616467652e6275696c646b6974652e636f6d2f37393739643933626336323739616135333939373166323731323533633635643565386665326665343363393062626232352e737667)](https://buildkite.com/bazel/flatbuffers)[![Fuzzing Status](https://camo.githubusercontent.com/b79d9f84323295bba044ee39d8aef29c8c29edca53f5d26be1a650de85d89e8b/68747470733a2f2f6f73732d66757a7a2d6275696c642d6c6f67732e73746f726167652e676f6f676c65617069732e636f6d2f6261646765732f666c6174627566666572732e737667)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:flatbuffers)[![Discord Chat](https://camo.githubusercontent.com/12ded9bf8a5de5ae5e183d3902db80f82ad949b026bdbae0c5f42fb636712cf8/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3635363230323738353932363135323230362e737667)](https:///discord.gg/6qgKs3R)[![Twitter Follow](https://camo.githubusercontent.com/aeba7eb158e45f6938cc79c09ea1f8597252ebeec5979c4e3074459a711d9bcf/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f77766f2e7376673f7374796c653d736f6369616c)](https://twitter.com/wvo)[![Twitter Follow](https://camo.githubusercontent.com/02be97ac01e6fdc06238fa326263e77fe89281f260cdb1854b19d26abd059887/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f646261696c657963686573732e7376673f7374796c653d736f6369616c)](https://twitter.com/dbaileychess)

**FlatBuffers** is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serialized data without parsing/unpacking it first, while still having great forwards/backwards compatibility.

Quick Start
-----------

[](#quick-start)

1. Build the compiler for flatbuffers (`flatc`)

    Use `cmake` to create the build files for your platform and then perform the compilation (Linux example).

    ```
    cmake -G "Unix Makefiles"
    make -j

    ```
2. Define your flatbuffer schema (`.fbs`)

    Write the [schema](https://flatbuffers.dev/flatbuffers_guide_writing_schema.html) to define the data you want to serialize. See [monster.fbs](https://github.com/google/flatbuffers/blob/master/samples/monster.fbs) for an example.
3. Generate code for your language(s)

    Use the `flatc` compiler to take your schema and generate language-specific code:

    ```
    ./flatc --cpp --rust monster.fbs

    ```

    Which generates `monster_generated.h` and `monster_generated.rs` files.
4. Serialize data

    Use the generated code, as well as the `FlatBufferBuilder` to construct your serialized buffer. ([`C++` example](https://github.com/google/flatbuffers/blob/master/samples/sample_binary.cpp#L24-L56))
5. Transmit/store/save Buffer

    Use your serialized buffer however you want. Send it to someone, save it for later, etc...
6. Read the data

    Use the generated accessors to read the data from the serialized buffer.

    It doesn't need to be the same language/schema version, FlatBuffers ensures the data is readable across languages and schema versions. See the [`Rust` example](https://github.com/google/flatbuffers/blob/master/samples/sample_binary.rs#L92-L106) reading the data written by `C++`.

Documentation
-------------

[](#documentation)

**Go to our [landing page](https://google.github.io/flatbuffers) to browse our documentation.**

Supported operating systems
---------------------------

[](#supported-operating-systems)

- Windows
- macOS
- Linux
- Android
- And any others with a recent C++ compiler (C++ 11 and newer)

Supported programming languages
-------------------------------

[](#supported-programming-languages)

Code generation and runtime libraries for many popular languages.

1. C
2. C++ - [snapcraft.io](https://snapcraft.io/flatbuffers)
3. C# - [nuget.org](https://www.nuget.org/packages/Google.FlatBuffers)
4. Dart - [pub.dev](https://pub.dev/packages/flat_buffers)
5. Go - [go.dev](https://pkg.go.dev/github.com/google/flatbuffers)
6. Java - [Maven](https://search.maven.org/artifact/com.google.flatbuffers/flatbuffers-java)
7. JavaScript - [NPM](https://www.npmjs.com/package/flatbuffers)
8. Kotlin
9. Lobster
10. Lua
11. PHP
12. Python - [PyPI](https://pypi.org/project/flatbuffers/)
13. Rust - [crates.io](https://crates.io/crates/flatbuffers)
14. Swift - [swiftpackageindex](https://swiftpackageindex.com/google/flatbuffers)
15. TypeScript - [NPM](https://www.npmjs.com/package/flatbuffers)
16. Nim

Versioning
----------

[](#versioning)

FlatBuffers does not follow traditional SemVer versioning (see [rationale](https://github.com/google/flatbuffers/wiki/Versioning)) but rather uses a format of the date of the release.

Contribution
------------

[](#contribution)

- [FlatBuffers Issues Tracker](http://github.com/google/flatbuffers/issues) to submit an issue.
- [stackoverflow.com](http://stackoverflow.com/search?q=flatbuffers) with [`flatbuffers` tag](https://stackoverflow.com/questions/tagged/flatbuffers) for any questions regarding FlatBuffers.

*To contribute to this project,* see [CONTRIBUTING](http://github.com/google/flatbuffers/blob/master/CONTRIBUTING.md).

Community
---------

[](#community)

- [Discord Server](https:///discord.gg/6qgKs3R)

Security
--------

[](#security)

Please see our [Security Policy](SECURITY.md) for reporting vulnerabilities.

Licensing
---------

[](#licensing)

*Flatbuffers* is licensed under the Apache License, Version 2.0. See [LICENSE](https://github.com/google/flatbuffers/blob/master/LICENSE) for the full license text.

###  Health Score

70

—

ExcellentBetter than 100% of packages

Maintenance82

Actively maintained with recent releases

Popularity71

Solid adoption and visibility

Community49

Growing community involvement

Maturity71

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~92 days

Recently: every ~83 days

Total

40

Last Release

150d ago

Major Versions

v1.12.1 → v2.0.02021-05-10

v2.0.8 → v22.9.242022-09-27

v22.12.6 → v23.1.42023-01-04

v23.5.26 → v24.3.62024-03-07

v24.12.23 → v25.1.212025-01-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d6142330ec657f82ef8123ca811d09cbd07dea54a3d0c0bc628b5f4322b3038?d=identicon)[gwvo](/maintainers/gwvo)

---

Top Contributors

[![dbaileychess](https://avatars.githubusercontent.com/u/1477247?v=4)](https://github.com/dbaileychess "dbaileychess (396 commits)")[![aardappel](https://avatars.githubusercontent.com/u/4663648?v=4)](https://github.com/aardappel "aardappel (330 commits)")[![vglavnyy](https://avatars.githubusercontent.com/u/31897320?v=4)](https://github.com/vglavnyy "vglavnyy (94 commits)")[![rw](https://avatars.githubusercontent.com/u/21367?v=4)](https://github.com/rw "rw (85 commits)")[![mustiikhalil](https://avatars.githubusercontent.com/u/26250654?v=4)](https://github.com/mustiikhalil "mustiikhalil (49 commits)")[![paulovap](https://avatars.githubusercontent.com/u/2519883?v=4)](https://github.com/paulovap "paulovap (45 commits)")[![krojew](https://avatars.githubusercontent.com/u/1268573?v=4)](https://github.com/krojew "krojew (44 commits)")[![TGIshib](https://avatars.githubusercontent.com/u/12123342?v=4)](https://github.com/TGIshib "TGIshib (43 commits)")[![vaind](https://avatars.githubusercontent.com/u/6349682?v=4)](https://github.com/vaind "vaind (33 commits)")[![bjornharrtell](https://avatars.githubusercontent.com/u/141030?v=4)](https://github.com/bjornharrtell "bjornharrtell (33 commits)")[![jtdavis777](https://avatars.githubusercontent.com/u/9122119?v=4)](https://github.com/jtdavis777 "jtdavis777 (23 commits)")[![aeneid](https://avatars.githubusercontent.com/u/9805174?v=4)](https://github.com/aeneid "aeneid (22 commits)")[![fliiiix](https://avatars.githubusercontent.com/u/1682954?v=4)](https://github.com/fliiiix "fliiiix (22 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (18 commits)")[![stefan301](https://avatars.githubusercontent.com/u/32997632?v=4)](https://github.com/stefan301 "stefan301 (17 commits)")[![pjulien](https://avatars.githubusercontent.com/u/673277?v=4)](https://github.com/pjulien "pjulien (16 commits)")[![mering](https://avatars.githubusercontent.com/u/133344217?v=4)](https://github.com/mering "mering (15 commits)")[![le-michael](https://avatars.githubusercontent.com/u/13042828?v=4)](https://github.com/le-michael "le-michael (15 commits)")[![AustinSchuh](https://avatars.githubusercontent.com/u/294043?v=4)](https://github.com/AustinSchuh "AustinSchuh (15 commits)")[![tira-misu](https://avatars.githubusercontent.com/u/6527395?v=4)](https://github.com/tira-misu "tira-misu (14 commits)")

---

Tags

cc-plus-plusc-sharpcross-platformflatbuffersgogrpcjavajavascriptjson-parsermarshallingmmapprotobufpythonrpcrustserializationserialization-librarytypescriptzero-copygoogleserializationflatbuffers

### Embed Badge

![Health badge](/badges/google-flatbuffers/health.svg)

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

###  Alternatives

[opis/closure

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

2.6k230.0M284](/packages/opis-closure)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[apache/avro

Apache Avro™ is a data serialization system.

3.2k26.8k3](/packages/apache-avro)[flix-tech/avro-serde-php

A library to serialize and deserialize Avro records making use of the confluent schema registry

674.0M17](/packages/flix-tech-avro-serde-php)[t1gor/robots-txt-parser

PHP class to parse robots.txt rules according to Google, Yandex, W3C and The Web Robots Pages specifications.

85494.6k4](/packages/t1gor-robots-txt-parser)

PHPackages © 2026

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