PHPackages                             tarjama/socket-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. tarjama/socket-emitter

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

tarjama/socket-emitter
======================

A PHP implementation of socket.io-emitter

v1.0.0(1y ago)090MITPHPPHP &gt;=5.3

Since May 14Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (2)Used By (0)

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 already. You can use e.g. [Credis](https://github.com/colinmollenhour/credis), but any other client that implements a `publish` method should work.

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).

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();
$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 throw an exception is phpredis is not 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(array('port' => '6379', 'host' => '127.0.0.1'));
$emitter->emit('event', array('property' => 'much value', 'another' => 'very object'));
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance49

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

369d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3e8ba63301b635d0138fe5d01b42c6c9d35d5b3c88ee752e1959015f9c8107d4?d=identicon)[anas almasri](/maintainers/anas%20almasri)

---

Top Contributors

[![anasalmasri99](https://avatars.githubusercontent.com/u/211709520?v=4)](https://github.com/anasalmasri99 "anasalmasri99 (7 commits)")

---

Tags

Socket.ioemit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tarjama-socket-emitter/health.svg)

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

###  Alternatives

[rase/socket.io-emitter

A PHP implementation of socket.io-emitter

345240.1k2](/packages/rase-socketio-emitter)[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)

PHPackages © 2026

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