PHPackages                             spiral/goridge - 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. [API Development](/categories/api)
4. /
5. spiral/goridge

ActiveGoridge[API Development](/categories/api)

spiral/goridge
==============

High-performance PHP-to-Golang RPC bridge

4.2.1(1y ago)12212.5M—4.8%1120MITPHPPHP &gt;=8.1CI passing

Since Aug 13Pushed 1w ago11 watchersCompare

[ Source](https://github.com/spiral/goridge-php)[ Packagist](https://packagist.org/packages/spiral/goridge)[ Docs](https://spiral.dev/)[ GitHub Sponsors](https://github.com/sponsors/roadrunner-server)[ RSS](/packages/spiral-goridge/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (47)Used By (20)

[   ![](https://github.com/roadrunner-server/.github/assets/8040338/040fb694-1dd3-4865-9d29-8e0748c2c8b8) ](https://roadrunner.dev)High-performance PHP-to-Golang IPC bridge
=========================================

[](#high-performance-php-to-golang-ipc-bridge)

[![Latest Stable Version](https://camo.githubusercontent.com/b2a8d839d73471c27ac78f26e75b7708ab78113aa2f83119e12a5d778d64c97d/68747470733a2f2f706f7365722e707567782e6f72672f73706972616c2f676f72696467652f762f737461626c65)](https://packagist.org/packages/spiral/goridge)[![CI](https://github.com/spiral/goridge-php/workflows/CI/badge.svg)](https://github.com/spiral/goridge-php/actions)[![Codecov](https://camo.githubusercontent.com/ea69b0432eee78b74eb2ca8bda5e855025f0f60b6adb46ccfee360f32d78c320/68747470733a2f2f636f6465636f762e696f2f67682f726f616472756e6e65722d7068702f676f72696467652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/roadrunner-php/goridge/)[![Chat](https://camo.githubusercontent.com/4442b73a11753b80fdd7b442ddbfaf8383902c8b9ffa66ed1718e8c62e102f2e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646973636f72642d636861742d6d6167656e74612e737667)](https://discord.gg/TFeEmCs)

[![PHPClasses Innovation Award](https://camo.githubusercontent.com/fe57c4c057a2f4deeaef9ea59463ccb88f4fa362499336ac31c5a14bec4681a2/68747470733a2f2f66696c65732e706870636c61737365732e6f72672f67726170686963732f706870636c61737365732f696e6e6f766174696f6e2d61776172642d6c6f676f2e706e67)](https://camo.githubusercontent.com/fe57c4c057a2f4deeaef9ea59463ccb88f4fa362499336ac31c5a14bec4681a2/68747470733a2f2f66696c65732e706870636c61737365732e6f72672f67726170686963732f706870636c61737365732f696e6e6f766174696f6e2d61776172642d6c6f676f2e706e67)

Goridge is high performance PHP-to-Golang codec library which works over native PHP sockets and Golang net/rpc package. The library allows you to call Go service methods from PHP with minimal footprint, structures and `[]byte` support.
Golang source code can be found in this repository: [goridge](https://github.com/roadrunner-server/goridge)

See  - High-performance PHP application server, load-balancer and process manager written in Golang
Features
--------

[](#features)

- no external dependencies or services, drop-in (64bit PHP version required)
- sockets over TCP or Unix (ext-sockets is required), standard pipes
- very fast (300k calls per second on Ryzen 1700X over 20 threads)
- native `net/rpc` integration, ability to connect to existing application(s)
- standalone protocol usage
- structured data transfer using json or msgpack
- `[]byte` transfer, including big payloads
- service, message and transport level error handling
- hackable
- works on Windows
- unix sockets powered (also on Windows)

Installation
------------

[](#installation)

```
composer require spiral/goridge

```

Example
-------

[](#example)

```
