PHPackages                             openroutes/openroutes - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. openroutes/openroutes

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

openroutes/openroutes
=====================

route for PHP

16PHP

Since Jun 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jackeq/openroutes)[ Packagist](https://packagist.org/packages/openroutes/openroutes)[ RSS](/packages/openroutes-openroutes/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

openroutes
==========

[](#openroutes)

> 轻量级php路由

\###安装

> 编辑composer.json

```
{
    "require": {
        "openroutes/openroutes": "dev-master",
    }
}
```

> 执行 composer update

\###使用

```
require './vendor/autoload.php';
use \openroutes\openroutes\openroutes;
openroutes::get('index', function () {
    echo 'index';
});
openroutes::run();
```

\###示例

\#####get/post/delete/put

```
openroutes::get('article/info', function () {
     echo 'article/info';
});
```

\#####any

```
openroutes::any('article/info', function () {
     echo 'article/info';
});
```

\#####match

```
openroutes::match(['get', 'post'], 'article/info', function () {
     echo 'article/info';
});
```

\#####带参数

```
openroutes::get('article/id/{$id}', function ($id) {
     echo 'article/id'.$id;
});
```

\#####参数验证

```
openroutes::get('article/id/{$id}', function ($id) {
     echo 'article/id'.$id;
})->verify(['id' => '/^[0-9]*$/']);
```

12321321

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/58057328?v=4)[LongJian](/maintainers/jackeq)[@Jackeq](https://github.com/Jackeq)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[cocur/chain

Consistent and chainable array manipulation

8171.2k3](/packages/cocur-chain)

PHPackages © 2026

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