PHPackages                             ruslanmelnychenko/socket.io-php-emitter - 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. ruslanmelnychenko/socket.io-php-emitter

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

ruslanmelnychenko/socket.io-php-emitter
=======================================

PHP socket.io event emitter (PhpRedis)

1.0.0(3y ago)1328↓50%MITPHPPHP ^7.1.1|^8

Since Jan 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/RuslanMelnychenko/socket.io-php-emitter)[ Packagist](https://packagist.org/packages/ruslanmelnychenko/socket.io-php-emitter)[ RSS](/packages/ruslanmelnychenko-socketio-php-emitter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

ruslanmelnychenko/socket.io-php-emitter [![Build Status](https://camo.githubusercontent.com/f3b0e9b9f1f6b476dd3a0986852deeb2b839ef822c500266a37ecae17482be1e/68747470733a2f2f7472617669732d63692e6f72672f7275736c616e6d656c6e796368656e6b6f2f736f636b65742e696f2d7068702d656d69747465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ruslanmelnychenko/socket.io-php-emitter)
============================================================================================================================================================================================================================================================================================================================================================================================

[](#ruslanmelnychenkosocketio-php-emitter-)

A PHP implementation of node.js socket.io-emitter. Use PhpRedis client.

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

[](#installation)

```
composer require ruslanmelnychenko/socket.io-php-emitter
```

Usage
-----

[](#usage)

### Emit payload message

[](#emit-payload-message)

```
use RuslanMelnychenko\SocketIO\Emitter;
...

$client = new \Redis();

(new Emitter($client))
    ->of('namespace')->emit('event', 'payload message');
```

### Flags

[](#flags)

Possible flags

- json
- volatile
- broadcast

#### To use flags, just call it like in examples bellow

[](#to-use-flags-just-call-it-like-in-examples-bellow)

```
use RuslanMelnychenko\SocketIO\Emitter;
...

$client = new \Redis();
$client->connect('127.0.0.1');

(new Emitter($client))
    ->broadcast->emit('broadcast-event', 'payload message');

(new Emitter($client))
    ->flag('broadcast')->emit('broadcast-event', 'payload message');
```

### Emit an object

[](#emit-an-object)

```
use RuslanMelnychenko\SocketIO\Emitter;
...

$client = new \Redis();
$client->connect('127.0.0.1');

(new Emitter($client))
    ->emit('broadcast-event', ['param1' => 'value1', 'param2' => 'value2', ]);
```

### Emit an object in multiple rooms

[](#emit-an-object-in-multiple-rooms)

```
use RuslanMelnychenko\SocketIO\Emitter;
...

$client = new \Redis();
$client->connect('127.0.0.1');

(new Emitter($client))
    ->in(['room1', 'room2'])
    ->emit('broadcast-event', ['param1' => 'value1', 'param2' => 'value2', ]);
```

### Emit an object in multiple rooms with except rooms

[](#emit-an-object-in-multiple-rooms-with-except-rooms)

```
use RuslanMelnychenko\SocketIO\Emitter;
...

$client = new \Redis();
$client->connect('127.0.0.1');

(new Emitter($client))
    ->in(['room1', 'room2'])
    ->except(['room3'])
    ->emit('broadcast-event', ['param1' => 'value1', 'param2' => 'value2', ]);
```

### Send remote commands

[](#send-remote-commands)

```
use RuslanMelnychenko\SocketIO\Emitter;
...

$client = new \Redis();
$client->connect('127.0.0.1');

(new Emitter($client))
    ->in(['room1', 'room2'])
    ->except(['room3'])
    ->socketsJoin('room4');

(new Emitter($client))
    ->in(['room4'])
    ->socketsLeave('room3');

(new Emitter($client))
    ->in(['room1'])
    ->disconnectSockets();

(new Emitter($client))
    ->of('/tasks')
    ->serverSideEmit('taskDone', 1);
```

Credits
-------

[](#credits)

[Watch all forks](https://github.com/RuslanMelnychenko/socket.io-php-emitter/network/members)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~794 days

Total

3

Last Release

1456d ago

Major Versions

0.1.3 → 1.0.02022-05-22

PHP version history (2 changes)0.1.2PHP &gt;=5.6.4

1.0.0PHP ^7.1.1|^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e091c126524c33eace5f30073fed6592c620b44059ac596e703af8a081f7734?d=identicon)[RuslanMelnychenko](/maintainers/RuslanMelnychenko)

---

Top Contributors

[![jaceju](https://avatars.githubusercontent.com/u/310474?v=4)](https://github.com/jaceju "jaceju (10 commits)")[![RuslanMelnychenko](https://avatars.githubusercontent.com/u/30592345?v=4)](https://github.com/RuslanMelnychenko "RuslanMelnychenko (10 commits)")[![shakahl](https://avatars.githubusercontent.com/u/5264395?v=4)](https://github.com/shakahl "shakahl (5 commits)")[![fantik11](https://avatars.githubusercontent.com/u/35728123?v=4)](https://github.com/fantik11 "fantik11 (4 commits)")[![exls](https://avatars.githubusercontent.com/u/6387671?v=4)](https://github.com/exls "exls (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ruslanmelnychenko-socketio-php-emitter/health.svg)

```
[![Health](https://phpackages.com/badges/ruslanmelnychenko-socketio-php-emitter/health.svg)](https://phpackages.com/packages/ruslanmelnychenko-socketio-php-emitter)
```

###  Alternatives

[czdb/searcher

A PHP library for efficient IP geolocation using compact database formats.

284.4k1](/packages/czdb-searcher)[vkcom/kphp-polyfills

PHP implementations of functions supported by KPHP natively

163.3k7](/packages/vkcom-kphp-polyfills)

PHPackages © 2026

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