Skip to content
Snippets Groups Projects
Select Git revision
  • ed7ee3df9ae5389b3982d37862db62d52208812b
  • master default protected
  • arm-aarch-platform
  • arm-platform
  • vjpai-patch-3
  • vjpai-patch-1
  • v1.27.x
  • jtattermusch-patch-2
  • jtattermusch-patch-1
  • update-java-worker-example-in-performance-docs
  • revert-21805-revert-21797-reintroduce_21527
  • revert-21804-tls-credentials-1
  • zhen_cleanup_namecheck
  • revert-21806-revert-21767-revert-21725-revert-21680-cq_ordering
  • vjpai-patch-2
  • revert-21766-tls-credentials-1
  • revert-21640-change_local_tcp_security_level
  • revert-21680-cq_ordering
  • revert-21527-unify_boringssl_deps2
  • revert-20803-grpclb_stabilization
  • fix-kokoro-rvm-key
  • v1.27.0
  • v1.27.0-pre2
  • v1.27.0-pre1
  • v1.26.0
  • v1.26.0-pre1
  • v1.25.0
  • v1.25.0-pre1
  • v1.24.3
  • v1.24.2
  • v1.24.1
  • v1.23.1
  • v1.24.0
  • v1.24.0-pre2
  • v1.24.0-pre1
  • v1.22.1
  • v1.23.0
  • v1.23.0-pre1
  • v1.22.0
  • v1.22.0-pre1
  • v1.21.4
41 results

php

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    pythias authored
    ed7ee3df
    History

    gRPC in 3 minutes (PHP)

    PREREQUISITES

    This requires php >=5.5, phpize, pecl, phpunit

    INSTALL

    • Install the gRPC PHP extension

      $ [sudo] pecl install grpc
    • Clone this repository

      $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc
    • Install composer

      $ cd examples/php
      $ curl -sS https://getcomposer.org/installer | php
      $ php composer.phar install

    TRY IT!

    • Run the server

      Please follow the instruction in Node to run the server

      $ cd examples/node
      $ npm install
      $ cd dynamic_codegen or cd static_codegen
      $ node greeter_server.js
    • Run the client

      $ cd examples/php
      $ ./run_greeter_client.sh

    NOTE

    This directory has a copy of helloworld.proto because it currently depends on some Protocol Buffer 2.0 syntax. There is no proto3 support for PHP yet.

    TUTORIAL

    You can find a more detailed tutorial in gRPC Basics: PHP