PHP code example of protocolbuffers / protoc-gen-php
1. Go to this page and download the library: Download protocolbuffers/protoc-gen-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
protocolbuffers / protoc-gen-php example snippets
`
# this will link composer/bin/protoc-gen-php to /usr/local/bin/protoc-gen-php
protoc --php_out=<output_directory> -I. person.proto
# you can also specify the command.
protoc --plugin=vendor/bin/protoc-gen-php --php_out=<output_directory> -I. person.proto