PHPackages                             workerman/phpsocket.io - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. workerman/phpsocket.io

ActiveLibrary[Queues &amp; Workers](/categories/queues)

workerman/phpsocket.io
======================

A server side alternative implementation of socket.io in PHP based on Workerman

v2.3.0(1mo ago)2.4k598.0k↓44.6%507[1 issues](https://github.com/walkor/phpsocket.io/issues)16MITPHPPHP &gt;=7.1CI passing

Since Sep 17Pushed 1mo ago113 watchersCompare

[ Source](https://github.com/walkor/phpsocket.io)[ Packagist](https://packagist.org/packages/workerman/phpsocket.io)[ Docs](https://www.workerman.net)[ Fund](https://opencollective.com/walkor)[ Patreon](https://www.patreon.com/walkor)[ RSS](/packages/workerman-phpsocketio/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (6)Versions (45)Used By (16)

phpsocket.io
============

[](#phpsocketio)

[![Packagist Version](https://camo.githubusercontent.com/c14310a7f3b58a92f7ba4da826adac9b58a198694560e60ac4d66b723078a169/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776f726b65726d616e2f706870736f636b65742e696f)](https://packagist.org/packages/workerman/phpsocket.io)[![Total Downloads](https://camo.githubusercontent.com/87321f7d72a282b12947ed9eb0030035495c5069169f96d2adb414757caee8ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f776f726b65726d616e2f706870736f636b65742e696f)](https://packagist.org/packages/workerman/phpsocket.io)[![Monthly Downloads](https://camo.githubusercontent.com/c2583d4d0085ddf57df9e646e713b724fd783c62fa2e67c7beb173b23185316f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f776f726b65726d616e2f706870736f636b65742e696f)](https://packagist.org/packages/workerman/phpsocket.io)[![PHP Version](https://camo.githubusercontent.com/abbdcb1137dfde4682d5c8e891ad1cfdbfde64740d35f77682b75ff38d009263/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e312d626c7565)](https://www.php.net)[![Workerman](https://camo.githubusercontent.com/fa161474d44a829426df915c85119b8bdcfa8b4778ddd17ae622ce560d2a231f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f776f726b65726d616e2d253345253344342e30253230253343352e302d6f72616e6765)](https://github.com/walkor/Workerman)[![CI](https://github.com/walkor/phpsocket.io/actions/workflows/ci.yml/badge.svg)](https://github.com/walkor/phpsocket.io/actions/workflows/ci.yml)[![License](https://camo.githubusercontent.com/b4d3c3024f97666562587739d7d5484bcf21379a4b982c8caed75da2bdc780e0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f776f726b65726d616e2f706870736f636b65742e696f)](LICENSE)

A server-side PHP implementation of [socket.io](https://github.com/socketio/socket.io) based on [Workerman](https://github.com/walkor/Workerman).

> **Notice:** Only supports socket.io client &gt;= v1.3.0 and &lt;= v2.x. **socket.io v3 and v4 are not supported.**Requires PHP &gt;= 7.1 and Workerman &gt;= 4.0 &lt; 5.0. **Workerman 5.x is not supported.**For the full server API, see [socket.io/docs/v2/server-api](https://socket.io/docs/v2/server-api/).

Install
-------

[](#install)

```
composer require workerman/phpsocket.io
```

Examples
--------

[](#examples)

### Simple chat

[](#simple-chat)

`start.php`

```
