PHPackages                             0rpc/zerorpc-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. 0rpc/zerorpc-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

0rpc/zerorpc-php
================

A Standard ZeroRPC client.

1.2.2(10y ago)1514.6k131MITPHPPHP &gt;=5.4.0

Since Sep 8Pushed 7y ago4 watchersCompare

[ Source](https://github.com/0rpc/zerorpc-php)[ Packagist](https://packagist.org/packages/0rpc/zerorpc-php)[ RSS](/packages/0rpc-zerorpc-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (1)

zerorpc PHP Client
==================

[](#zerorpc-php-client)

Quick start
-----------

[](#quick-start)

- check dependences

```
$ composer install

```

- recommand installation for Mac

```
$ brew install zeromq --universal
$ brew install php56
$ brew install php56-msgpack
$ brew install php56-zmq

```

- Installing zerorpc on Ubuntu

```
$ sudo pecl install channel://pecl.php.net/msgpack-0.5.5
$ sudo apt-get install pkg-config
$ git clone git://github.com/mkoppanen/php-zmq.git
$ cd php-zmq && sudo phpize && ./configure
$ sudo make && make install

```

*Note: Don't forget to add the extensions to your php.ini*

```
extension=msgpack.so
extension=zmq.so

```

Timeout Setting
---------------

[](#timeout-setting)

- `$timeout` is in milliseconds
- `$client->setTimeout($timeout)` is only work on sync calls
- `Channel::dispatch($timeout)` is only work on async calls

Example
-------

[](#example)

**Server:**

Read [official python server guide](https://github.com/0rpc/zerorpc-python) and start two simple `time` server.

```
$ zerorpc --server --bind tcp://*:1234 time
$ zerorpc --server --bind tcp://*:2345 time

```

**Client:**

```
$ php example/time.php

```

This will return:

```
Example 1: start sync call:
cost 5.0087389945984 s
Example 2: start async call:
cost 3.0069580078125 s

```

Know Issue
----------

[](#know-issue)

We assume most of the PHP usage scenario is webserver, so `LostRemoteException` is not implemented, and because of that `heartbeat` is disabled.

Credits
-------

[](#credits)

Origin main author of this repo is: [@liangshan](https://github.com/liangshan)Other contributors: [@wenzong](https://github.com/wenzong), [@thewinterwind](https://github.com/thewinterwind)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3905d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7284037643a3a607b904757cb15ff87143173ed207a1faf67edc53fb51dead26?d=identicon)[liangshan](/maintainers/liangshan)

---

Top Contributors

[![liangshan](https://avatars.githubusercontent.com/u/1119114?v=4)](https://github.com/liangshan "liangshan (5 commits)")[![stuartwan](https://avatars.githubusercontent.com/u/1668944?v=4)](https://github.com/stuartwan "stuartwan (4 commits)")[![mark-juwai](https://avatars.githubusercontent.com/u/8097976?v=4)](https://github.com/mark-juwai "mark-juwai (3 commits)")[![bombela](https://avatars.githubusercontent.com/u/216204?v=4)](https://github.com/bombela "bombela (1 commits)")

### Embed Badge

![Health badge](/badges/0rpc-zerorpc-php/health.svg)

```
[![Health](https://phpackages.com/badges/0rpc-zerorpc-php/health.svg)](https://phpackages.com/packages/0rpc-zerorpc-php)
```

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
