1. Go to this page and download the library: Download dkkoma/php-grpc-lite 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/ */
dkkoma / php-grpc-lite example snippets
bash
pie install dkkoma/php-grpc-lite --auto-install-build-tools --auto-install-system-dependencies
bash
docker compose run --rm dev sh -lc 'phpize && ./configure --enable-grpc && make -j$(nproc)'
docker compose run --rm dev php -d extension=/workspace/modules/grpc.so -r 'var_dump(extension_loaded("grpc"), defined("Grpc\\VERSION") && constant("Grpc\\VERSION") === "0.0.15");'