php-protocolbuffers provides full protocol buffers features into PHP.
Alpha (considering phpish API design)
- PHP5.3 higher
PHP5.2 is limited support (can't use ProtocolBuffers\Message::parseFromString()
. you have to encode / decode via ProtocolBuffers methods).
- Google's
protoc
compiler version 2.3 or above ¹
¹Only needed for generate classes from .proto
file.
git clone https://github.com/chobie/php-protocolbuffers.git
cd php-protocolbuffers
phpize
./configure
make
make install
# please add following line to your php.ini
# extension=protocolbuffers.so
protoc-gen-php
is related project (https://github.com/chobie/protoc-gen-php).
you need this when you generate message from .proto file.
see wiki https://github.com/chobie/php-protocolbuffers/wiki
Standard types (numbers, string, enums, messages, etc) | supported |
Repeated fields | supported |
Packed attributes | supported |
Extensions | beta |
Unknown fields | beta |
64bit values | beta |
Service (RPC) | not supported yet |
New BSD License