PHPackages                             rnaga/emit-php - 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. [Framework](/categories/framework)
4. /
5. rnaga/emit-php

ActiveLibrary[Framework](/categories/framework)

rnaga/emit-php
==============

A PHP framework to develop WebSocket, HTTP and FCGI Applications

9103[1 issues](https://github.com/rnaga/EmitPHP/issues)PHP

Since Mar 23Pushed 9y ago2 watchersCompare

[ Source](https://github.com/rnaga/EmitPHP)[ Packagist](https://packagist.org/packages/rnaga/emit-php)[ RSS](/packages/rnaga-emit-php/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

EmitPHP
=======

[](#emitphp)

EmitPHP is a PHP framework that works with non-blocking I/O.

You can write your web applications and APIs in HTTP, FCGI and WebSocket.

As of now, this is an experimental project and there still exists errors and bugs.

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

[](#installation)

- It requires PHP 7(CLI) and composer to run
- If you haven't installed composer, run below to install it.

```
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
```

- Download [EmitPHP source code](https://github.com/rnaga/EmitPHP.git) from github
- Run composer to create autoload

```
composer install
```

Now you can run [Examples](https://github.com/rnaga/EmitPHP/tree/master/examples)

Usage
-----

[](#usage)

### WebSocket

[](#websocket)

Yes, EmitPHP supports WebSocket.

you can create your WebSocket Application with a few lines of code.

Below is an example of how to create a WebSocket Application.

```
// Create a new WS Application
$app = (new WSServer())->listen(4000)->app();
// Triggers when messages received
$app->on('message', function($conn, $msg){
    // Echo message
    $conn->send("echo => ". $msg);
    // Close the connection
    $conn->close();
});

\Emit\Loop();
```

### HTTP

[](#http)

You can easily create a HTTP server as below

```
$server = (new HTTPServer())->listen(4000);
$server->on('request', function($req, $res){
    // Send response
    $res->send("Hello World");
    // Close connection
    $res->end();
});

\Emit\Loop();
```

### Router

[](#router)

Example for using Router

```
$server = (new HTTPServer())->listen(9000);
// Create a new Route
$route = $server->route();
// Get method
$route->get("/", function($req, $res, $next){
    $res->send("Hello World");
    // Calling the next handler
    $next();
});
// Register the route
$server->use($route);

\Emit\Loop();
```

### FCGI

[](#fcgi)

EmitPHP supports FCGI which works with Web Servers such as apache

```
$server = (new FCGIServer())->listen(9000);
$server->on('request', function($req, $res){
    // Send response
    $res->send("Hello World");
    // Close connection
    $res->end();
});

\Emit\Loop();
```

See [examples](https://github.com/rnaga/EmitPHP/tree/master/examples) for more details.

What's next
-----------

[](#whats-next)

Please send me your feeback at  and let me know how you like it. If there are demands, I will work more.

And if any of you wants to join the project, please let me know.

License
-------

[](#license)

EmitPHP is licensed under the MIT license. See License File for more information.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20383976?v=4)[rnaga](/maintainers/rnaga)[@rnaga](https://github.com/rnaga)

---

Top Contributors

[![rnaga](https://avatars.githubusercontent.com/u/20383976?v=4)](https://github.com/rnaga "rnaga (10 commits)")[![luwake](https://avatars.githubusercontent.com/u/11704776?v=4)](https://github.com/luwake "luwake (1 commits)")

### Embed Badge

![Health badge](/badges/rnaga-emit-php/health.svg)

```
[![Health](https://phpackages.com/badges/rnaga-emit-php/health.svg)](https://phpackages.com/packages/rnaga-emit-php)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M829](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[pinguo/php-msf

Pinguo Micro Service Framework For PHP

1.7k4.2k](/packages/pinguo-php-msf)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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