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

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

jkapron/gtfs-realtime-bindings
==============================

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

0.0.3(8y ago)015.1k↓61.9%1Apache-2.0PHPPHP &gt;=5.3.0

Since Feb 18Pushed 8y agoCompare

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

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

PHP GTFS-realtime Language Bindings
===================================

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

[![PHP version](https://camo.githubusercontent.com/573200e936000e26caafbbece88776fb1ebdf8ea60106799c60fb294bbdd917f/68747470733a2f2f62616467652e667572792e696f2f70682f676f6f676c65253246677466732d7265616c74696d652d62696e64696e67732e737667)](http://badge.fury.io/ph/google%2Fgtfs-realtime-bindings)

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": {
  "google/gtfs-realtime-bindings": "x.y.z"
}

```

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

[![PHP version](https://camo.githubusercontent.com/573200e936000e26caafbbece88776fb1ebdf8ea60106799c60fb294bbdd917f/68747470733a2f2f62616467652e667572792e696f2f70682f676f6f676c65253246677466732d7265616c74696d652d62696e64696e67732e737667)](http://badge.fury.io/ph/google%2Fgtfs-realtime-bindings)

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), check out the [the gtfs-realtime.php source file](https://github.com/google/gtfs-realtime-bindings-php/blob/master/src/gtfs-realtime.php).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% 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 ~551 days

Total

3

Last Release

3096d ago

### Community

Maintainers

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

---

Top Contributors

[![bdferris](https://avatars.githubusercontent.com/u/630674?v=4)](https://github.com/bdferris "bdferris (7 commits)")[![jkapron](https://avatars.githubusercontent.com/u/26311148?v=4)](https://github.com/jkapron "jkapron (1 commits)")[![pieterdp](https://avatars.githubusercontent.com/u/3898019?v=4)](https://github.com/pieterdp "pieterdp (1 commits)")

---

Tags

gtfs-realtime

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[czdb/searcher

A PHP library for efficient IP geolocation using compact database formats.

295.8k1](/packages/czdb-searcher)[neysi/directprint

Easy and direct file print from PHP

198.8k](/packages/neysi-directprint)[ip2location/ip2location-cakephp

Lookup for visitor's IP information, such as country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation and usage type.

224.7k](/packages/ip2location-ip2location-cakephp)[maximaster/tools.finder

Библиотека, облегчающая поиск идентификаторов разных сущностей для 1С-Битрикс

108.6k](/packages/maximaster-toolsfinder)

PHPackages © 2026

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