PHPackages                             gonzalo123/httpserver - 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. gonzalo123/httpserver

ActiveLibrary

gonzalo123/httpserver
=====================

HTTP server in PHP. Using reactphp or Built-In Server

14261PHP

Since Nov 7Pushed 12y ago1 watchersCompare

[ Source](https://github.com/gonzalo123/httpserver)[ Packagist](https://packagist.org/packages/gonzalo123/httpserver)[ RSS](/packages/gonzalo123-httpserver/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

HttpServer
==========

[](#httpserver)

Starting the Built-In PHP Webserver and handling requests
---------------------------------------------------------

[](#starting-the-built-in-php-webserver-and-handling-requests)

### Returning a simple text response

[](#returning-a-simple-text-response)

```
use G\HttpServer\Builder;
use Symfony\Component\HttpFoundation\Request;

Builder::createBuiltInServer(function (Request $request) {
        return "Hello " . $request->get('name');
    })->listen(1337);
```

### Returning a Response (one Silex application)

[](#returning-a-response-one-silex-application)

```
use G\HttpServer\Builder;
use Symfony\Component\HttpFoundation\Request;

$app = new Silex\Application();

$app->get('/', function () {
        return 'Hello';
    });

$app->get('/hello/{name}', function ($name) {
        return 'Hello ' . $name;
    });

Builder::createBuiltInServer(function (Request $request) use ($app) {
        return $app->handle($request);
    })->listen(1337);
```

Starting one React Webserver and handling requests
--------------------------------------------------

[](#starting-one-react-webserver-and-handling-requests)

### Returning a simple text response

[](#returning-a-simple-text-response-1)

```
use G\HttpServer\Builder;
use Symfony\Component\HttpFoundation\Request;

Builder::createReactServer(function (Request $request) {
        return "Hello " . $request->get('name');
    })->listen(1337);
```

### Returning a Response (one Silex application)

[](#returning-a-response-one-silex-application-1)

```
use G\HttpServer\Builder;
use Symfony\Component\HttpFoundation\Request;

$app = new Silex\Application();

$app->get('/', function () {
        return 'Hello';
    });

$app->get('/hello/{name}', function ($name) {
        return 'Hello ' . $name;
    });

Builder::createReactServer(function (Request $request) use ($app) {
        return $app->handle($request);
    })->listen(1337);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c5bcdeee0f7e214945e0d27310df0ad487e7d1ec10a8d4341dbdcabfac58f2f7?d=identicon)[gonzalo123](/maintainers/gonzalo123)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/gonzalo123-httpserver/health.svg)

```
[![Health](https://phpackages.com/badges/gonzalo123-httpserver/health.svg)](https://phpackages.com/packages/gonzalo123-httpserver)
```

PHPackages © 2026

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