Yes.
First and foremost, you have to be using PHP 5.3+ because the library
relies heavily on namespaces.
My code for building and exporting protobuf GTFS-realtime objects is
here: https://github.com/maxious/ACTBus-ui/blob/master/include/common-transit.inc.php#L91
As you can see from the exporting functions
https://github.com/maxious/ACTBus-ui/blob/master/include/common-transit.inc.php#L323
once you make a PHP-protobuf object, you can export it as binary
protobuf (for use in OpenTripPlanner realtime changes) or just as a
PHP array.
And the library with a pre-compiled PHP version of the schema
("gtfs-realtime.php"):
https://github.com/maxious/ACTBus-ui/tree/master/lib/Protobuf-PHP
I seem to recall I had to remove some lines at the start of the proto
file to get it to compile (the ones about creative commons licencing
etc.) but those do not affect the operation.
I also have some simpler (no real database call) examples I used for
testing: https://github.com/maxious/ACTBus-ui/blob/master/lib/Protobuf-PHP/test-alert.php
https://github.com/maxious/ACTBus-ui/blob/master/lib/Protobuf-PHP/test-tripupdates.php
My code currently does not read protobuf objects from files (my
transit authority is moving back to SIRI already) but I have just put
up another test file demonstrating that functionality:
https://github.com/maxious/ACTBus-ui/blob/master/lib/Protobuf-PHP/test-import-alert.php
which opens https://github.com/maxious/ACTBus-ui/blob/master/lib/Protobuf-PHP/example-alert.proto
or any other valid GTFS-realtime file (alerts or route updates) and
converts it to a PHP array for ease of use.