PHPackages                             rase/socket.io-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. [HTTP &amp; Networking](/categories/http)
4. /
5. rase/socket.io-emitter

ActiveLibrary[HTTP &amp; Networking](/categories/http)

rase/socket.io-emitter
======================

A PHP implementation of socket.io-emitter

0.7.0(11y ago)345240.1k↓19.8%64[17 issues](https://github.com/rase-/socket.io-php-emitter/issues)[5 PRs](https://github.com/rase-/socket.io-php-emitter/pulls)2MITPHPPHP &gt;=5.3

Since Oct 9Pushed 3y ago37 watchersCompare

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

READMEChangelogDependencies (2)Versions (5)Used By (2)

socket.io-php-emitter
=====================

[](#socketio-php-emitter)

A PHP implementation of socket.io-emitter.

This project requires a Redis client for PHP. If you dont have the [PECL Redis](https://github.com/nicolasff/phpredis) installed, the emitter will default to using [TinyRedisClient](https://github.com/ptrofimov/tinyredisclient). You can, however, pass in any Redis client that supports a `publish` method.

Installation and development
----------------------------

[](#installation-and-development)

To install and use in your PHP project, install it as a [composer package](https://packagist.org/packages/rase/socket.io-emitter). Install dependencies with `composer install`.

To run tests, invoke `make test`. The current test suite will just be checking redis monitor that everything is published correctly. Some work will be put into making a better integration test suite in the near future.

Usage
-----

[](#usage)

### Initialization

[](#initialization)

```
$redis = new \Redis(); // Using the Redis extension provided client
$redis->connect('127.0.0.1', '6379');
$emitter = new SocketIO\Emitter($redis);
$emitter->emit('event', 'payload str');
```

### Broadcasting and other flags

[](#broadcasting-and-other-flags)

Possible flags

- json
- volatile
- broadcast

```
// Below initialization will create a  phpredis client, or a TinyRedisClient depending on what is installed
$emitter = new SocketIO\Emitter(array('port' => '6379', 'host' => '127.0.0.1'));
// broadcast can be replaced by any of the other flags
$emitter->broadcast->emit('other event', 'such data');
```

### Emitting objects

[](#emitting-objects)

```
$emitter = new SocketIO\Emitter(); // If arguments are not provided, they will default to array('port' => '6379', 'host' => '127.0.0.1')
$emitter->emit('event', array('property' => 'much value', 'another' => 'very object'));
```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity54

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

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

Total

4

Last Release

4195d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36b27d8fc63f4a022eb167578bdaa8e7e6b2b7b9c05c234394bd77b6d672b624?d=identicon)[rase](/maintainers/rase)

---

Top Contributors

[![rase-](https://avatars.githubusercontent.com/u/1220601?v=4)](https://github.com/rase- "rase- (12 commits)")[![kitek](https://avatars.githubusercontent.com/u/1109937?v=4)](https://github.com/kitek "kitek (1 commits)")[![marcguyer](https://avatars.githubusercontent.com/u/35496?v=4)](https://github.com/marcguyer "marcguyer (1 commits)")

---

Tags

Socket.ioemit

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[ashiina/socket.io-emitter

\*Maintained\* A PHP implementation of socket.io-emitter

38361.6k1](/packages/ashiina-socketio-emitter)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[elephantio/elephant.io

Send events to a socket.io server through PHP

135713.8k7](/packages/elephantio-elephantio)[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)[codeception/module-phpbrowser

Codeception module for testing web application over HTTP

6529.8M508](/packages/codeception-module-phpbrowser)

PHPackages © 2026

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