PHPackages                             mburger/gtfs-realtime-bindings - 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. mburger/gtfs-realtime-bindings

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

mburger/gtfs-realtime-bindings
==============================

PHP classes generated from the GTFS-realtime protocol buffer specification.

0.0.1(3y ago)058↓100%Apache-2.0PHPPHP &gt;=7.3

Since Jan 9Pushed 3y agoCompare

[ Source](https://github.com/MathisBurger/gtfs-realtime-bindings-php)[ Packagist](https://packagist.org/packages/mburger/gtfs-realtime-bindings)[ Docs](https://github.com/google/gtfs-realtime-bindings-php)[ RSS](/packages/mburger-gtfs-realtime-bindings/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PHP GTFS-realtime Language Bindings (PHP 7&amp;8)
=================================================

[](#php-gtfs-realtime-language-bindings-php-78)

*NOTE: This is a fork of the original package with updated depenedencies for the use with newer PHP versions.*

Provides PHP classes generated from the [GTFS-realtime](https://developers.google.com/transit/gtfs-realtime/) Protocol Buffer specification. These classes will allow you to parse a binary Protocol Buffer GTFS-realtime data feed into PHP objects.

For bindings in other languages, see the [gtfs-realtime-bindings](https://github.com/google/gtfs-realtime-bindings)project.

Add the Dependency
------------------

[](#add-the-dependency)

To use the `gtfs-realtime-bindings-php` classes in your own project, you need to first install the [Packagist Composer package](https://packagist.org/packages/google/gtfs-realtime-bindings). To do so, add a dependency in your `composer.json` file:

```
"require": {
  "mburger/gtfs-realtime-bindings": "x.y.z"
}

```

Where `x.y.z` is the latest release version:

Then update your Composer dependencies:

```
composer update

```

Example Code
------------

[](#example-code)

The following code snippet demonstrates downloading a GTFS-realtime data feed from a particular URL, parsing it as a FeedMessage (the root type of the GTFS-realtime schema), and iterating over the results.

```
require_once 'vendor/autoload.php';

use transit_realtime\FeedMessage;

$data = file_get_contents("URL OF YOUR GTFS-REALTIME SOURCE GOES HERE");
$feed = new FeedMessage();
$feed->parse($data);
foreach ($feed->getEntityList() as $entity) {
  if ($entity->hasTripUpdate()) {
    error_log("trip: " . $entity->getId());
  }
}
```

For more details on the naming conventions for the PHP classes generated from the [gtfs-realtime.proto](https://developers.google.com/transit/gtfs-realtime/gtfs-realtime-proto),

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 58.3% 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

Unknown

Total

1

Last Release

1217d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2d132e9c4675b1382109d106a342224ed7dd443a359930b202108d007daeb1b?d=identicon)[MathisBurger](/maintainers/MathisBurger)

---

Top Contributors

[![bdferris](https://avatars.githubusercontent.com/u/630674?v=4)](https://github.com/bdferris "bdferris (7 commits)")[![MathisBurger](https://avatars.githubusercontent.com/u/57145815?v=4)](https://github.com/MathisBurger "MathisBurger (3 commits)")[![barbeau](https://avatars.githubusercontent.com/u/928045?v=4)](https://github.com/barbeau "barbeau (1 commits)")[![cookieguru](https://avatars.githubusercontent.com/u/1888809?v=4)](https://github.com/cookieguru "cookieguru (1 commits)")

---

Tags

gtfs-realtime

### Embed Badge

![Health badge](/badges/mburger-gtfs-realtime-bindings/health.svg)

```
[![Health](https://phpackages.com/badges/mburger-gtfs-realtime-bindings/health.svg)](https://phpackages.com/packages/mburger-gtfs-realtime-bindings)
```

PHPackages © 2026

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