PHPackages                             exan/poopexpress - 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. exan/poopexpress

ActiveLibrary[Framework](/categories/framework)

exan/poopexpress
================

A crappy router you shouldn't use

2.0.0(1y ago)16MITPHP

Since Feb 5Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Exanlv/poop-express)[ Packagist](https://packagist.org/packages/exan/poopexpress)[ RSS](/packages/exan-poopexpress/feed)WikiDiscussions main Synced today

READMEChangelog (3)DependenciesVersions (4)Used By (0)

PoopExpress
===========

[](#poopexpress)

It's a router. It's fast. Don't use it.

Using it is a shitty experience, hence PoopExpress.

Usage
-----

[](#usage)

You start by initializing the router, with your request details

```
$router = new PoopExpress($_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_URI']);
```

You then attempt routes, rather than registering them

```
$router->attempt([''], ['GET', function () {
    echo 'Home page';
}]) || $router->attempt(['somewhere-else'], ['GET' => function () {
    echo 'This is a different page';
}]);
```

This gives you 2 endpoints, with automatic 405 handling:

- `/`
- `/somewhere-else`

Dynamic routes are an option

```
$router->attempt(['group', '*'], ['GET' => function ($id) {
    echo 'This page is within the "group", ', $id;
}]);
```

And for optimal performance, use this garbage syntax to seperate your routes into groups:

```
(
    $router->group(['group']) && (
        $router->attempt(['group', 'nowhere'], ['GET' => function () {
            echo 'This page is also within the "group"';
        }]) || $router->attempt(['group', 'some-other-group'], ['POST' => function () {
            echo 'This page is yet again within the "group"';
        }])
    )
)
```

All together:

```
$router = new PoopExpress($_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_URI']);

$router->attempt([''], ['GET', function () {
    echo 'Home page';
}]) || $router->attempt(['somewhere-else'], ['GET' => function () {
    echo 'This is a different page';
}]) || (
    $router->group(['group']) && (
        $router->attempt(['group', 'nowhere'], ['GET' => function () {
            echo 'This page is also within the "group"';
        }]) || $router->attempt(['group', 'some-other-group'], ['POST' => function () {
            echo 'This page is yet again within the "group"';
        }]) || $router->attempt(['group', '*'], ['GET' => function ($id) {
            echo 'This page is within the "group", ', $id;
        }])
    )
) || $router->attempt(['not-group', 'page'], ['GET' => function () {
    echo 'This is no longer in the group';
}]) || (function () {
    http_response_code(404);
    echo '404';
})();
```

### How is this fast?

[](#how-is-this-fast)

Routes are never registered, and when the "current" route is attempted, parsing of any other route never occurs to any degree. With groups and funky and-gates you can skip the checking of sub-routes if the parent does not match.

Due to this approach to routing, most generic benchmarks will fall flat when benchmarking PoopExpress. It's hard to accurately benchmark PoopExpress with a dynamic test.

If you are interested in including PoopExpress in your benchmark results, feel free to reach out for further guidance!

### Why shouldn't I use it?

[](#why-shouldnt-i-use-it)

If your app is slow, it's very unlikely throwing a new router into the mix will solve your problems.

It's also just plain painful to try to use this.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance67

Regular maintenance activity

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

512d ago

Major Versions

1.0.1 → 2.0.02025-02-06

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/exan-poopexpress/health.svg)

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

###  Alternatives

[laravel/dusk

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

1.9k39.6M299](/packages/laravel-dusk)[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)
