Simple router
Define routes, patterns and filters with a few lines of code.
Inphinit is a small and fast framework with a simple router, built-in tools and no heavy dependencies. Start a project in minutes.
composer create-project inphinit/inphinit:^2.1 my-app
Optionally, you can download:
Define routes, patterns and filters with a few lines of code.
Cache responses with ETag, Expires and 304 support.
Run tasks by interval, cron expression or just once.
Query XML and HTML documents using familiar selectors.
Group cookies and control their attributes easily.
Handle forwarded headers from trusted proxies.
Validate your app and find problems before deploy.
No external requirements, just PHP and your code.
Small core, low overhead and quick startup.
Fewer concepts to learn and less code to write.
Use only the parts you need in your project.
No. You can use it with plain PHP files. Composer is optional if you want extra packages.
Compatible with PHP 8, with backward compatibility for PHP 5.4.
Yes. You can add it gradually, one route at a time.
Yes. It runs on Apache, FrankenPHP, lighttpd, Nginx and IIS.
Open an issue or a pull request on GitHub .
Install Inphinit, create your first route and see it running.
Changelog between versions 2.0 and 2.1:
Inphinit\Experimental\Http\Method class refactored.x-forwarded-prefix header can now be used with RFC7239 (eg.: $forwarded->setFlags(Forwarded::PREFIX|Forwarded::RFC7239)).Forwarded::getPrefix().Inphinit\Dom\Selector class.Inphinit\Filesystem\File.Scheduler::prioritizeBackgroundTasks() in PHP<8.Storage:temp().create:command -> make:command.create:controller -> make:controller.create:view -> make:view.Built-in commands:
run create:command command.run create:controller command.run create:view command.run server command now checks whether the port is already in use.FileGenerator improved:
Forwarded support: