Question: I have a GTFS protocol buffer message (VehiclePosition.pb), and the corresponding protocol format (gtfs-realtime.proto), I would like to read the message in PHP alone (is that even possible?).

I looked at Google's python tutorial <https://developers.google.com/protocol-buffers/docs/pythontutorial> and encoding documentation <https://developers.google.com/protocol-buffers/docs/encoding> and <https://github.com/maxious/ACTBus-ui/tree/master/lib/Protobuf-PHP>, but I am having a really hard time conceptualizing what is going on. I think I understand that gtfs-realtime.php is a compiled instruction set of the encoding defined in gtfs-realtime.proto (please correct me if I am wrong), but I have no clue how to get it to decode VehiclePosition.pb. Also, what are the dependencies of gtfs-realtime.php (or the python equivalent for that matter)? Is there anything else I have to compile myself or anything that is not a simple php script if all I want to do is read VehiclePosition.pb?

Thanks.

Answer: 
You can use the official tool: <https://developers.google.com/transit/gtfs-realtime/code-samples#php>

It was released very recently. I've been using it for a few days and works like a charm.
Sorry Harry Truong, I tried your executable but it returns always NULL.
What I am doing wrong?

Edit: The problem is that I have no permission to execute in my server. Thanks for your executable.