Download the PHP package highperapp/router without Composer

On this page you can find all versions of the php package highperapp/router. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package router

HighPer Router

PHP Version Performance PSR-7 Tests

Ultra-fast hybrid Rust + PHP routing library with O(1) ring buffer cache and transparent fallback.

โšก Ring Buffer Cache

๐ŸŽฏ Performance Optimizations

Installation

Optional: Build Rust Engine (for maximum performance)

The router will automatically detect and use the Rust engine if available, with transparent fallback to PHP.

Quick Start

HTTP Methods

Route Parameters

Route Middleware

Route Names

Parameter Constraints

Built-in constraints:

Route Caching

The router includes intelligent caching:

Performance Optimization

Static vs Dynamic Routes

๐Ÿงช Testing

Run Router Tests

Test Coverage

๐Ÿ“Š Performance Benchmarks

Performance Metrics (Validated)

HighPer Router Engine Comparison

Engine Static Routes Dynamic Routes Memory Usage Best For
PHP 0.0003ms 0.00016ms 8MB/2000 routes Production
Rust FFI 0.0004ms 0.00016ms 8MB/2000 routes Heavy Load

Compared to Other Routers

Router Static Routes Dynamic Routes Memory Usage
HighPer (PHP) 0.0003ms 0.00016ms 8MB
FastRoute 0.002ms 0.005ms 25MB
nikic/FastRoute 0.003ms 0.007ms 32MB
amphp/router 0.004ms 0.008ms 28MB

Ring Buffer Cache Benefits

Advanced Usage

Route Groups

Custom Route Handlers

Integration Examples

With PSR-15 Middleware

Configuration

Router Engine Configuration

The router is a hybrid system supporting multiple engines with automatic fallback:

Engine Selection Modes

Engine Features Comparison

Engine Performance Memory Compatibility Requirements
Rust FFI 0.0004ms Low PHP 8.3+ FFI Rust library built
PHP 0.0003ms Lowest Universal PHP 8.3+ only
Auto Adaptive Optimal Universal Automatic selection

Transparent Fallback Behavior

Performance Note: Current benchmarks show the PHP engine is slightly faster than Rust FFI for typical web applications due to optimized PHP implementation and FFI overhead. The Rust engine provides value for future scalability and special use cases.

Building the Rust Engine

Rust Engine Requirements

When to Use Which Engine

Use PHP Engine (Recommended):

Use Rust Engine When:

Performance Configuration

โœจ Major Features

๐Ÿš€ Performance Improvements

๐Ÿ”ง Requirements

๐Ÿค Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/router-feature)
  3. Run tests (php run-router-tests.php)
  4. Commit changes (git commit -m 'Add router feature')
  5. Push to branch (git push origin feature/router-feature)
  6. Open Pull Request

๐Ÿ“„ License

MIT License - see the LICENSE file for details.



All versions of router with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3|^8.4
ext-ffi Version *
psr/http-message Version ^2.0
psr/http-server-handler Version ^1.0
psr/log Version ^3.0
amphp/amp Version ^3.0
amphp/parallel Version ^3.0
revolt/event-loop Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package highperapp/router contains the following files

Loading the files please wait ....