finds.dev← search

// the find

laruence/yar

★ 1,434 · C · NOASSERTION · updated Jul 2025

Light, concurrent RPC framework for PHP & C

Yar is a PHP PECL extension that implements an RPC framework on top of HTTP and TCP, written in C for performance. It's designed for PHP-to-PHP service communication and its main selling point is concurrent outbound calls via curl_multi under the hood. Aimed at teams running PHP microservices who want something lighter than gRPC or Thrift.

The concurrent client (`Yar_Concurrent_Client`) is the real reason to use this — firing multiple RPC calls in parallel and collecting callbacks is something you'd otherwise have to wire yourself with curl_multi. The protocol is straightforward and documented in the README down to the binary header struct, so interop with non-PHP clients is doable. Three packagers (PHP serialization, JSON, msgpack) are built in and swappable per-call, which is practical. The author (laruence, PHP core contributor and the person who wrote OPcache) means the C extension code is not amateur work.

There is no service discovery, load balancing, or retry logic — you're hardcoding URLs, which makes this feel more like a 2012-era solution than something you'd pick for a new system. The auth mechanism (provider/token strings in a custom binary header) is a hand-rolled scheme with no standard interop, and there's no TLS validation discussion anywhere in the docs. TCP transport exists but is clearly the second-class citizen — most documentation and presumably most real usage is HTTP-only. With gRPC having solid PHP support now and REST being dead simple, the niche this fills has shrunk considerably.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →