Slim is a PHP micro-framework that helps you quickly write simple yet powerful web applications and APIs. Created by Josh Lockhart, Slim implements PSR-7 HTTP message interfaces and a middleware-first architecture that makes it perfect for lightweight services where the overhead of a full-stack framework is unwelcome.
Slim is the framework Pi-hole built its admin UI on, and it powers thousands of small APIs and SaaS dashboards.
PHP micro-framework for fast APIs and small web apps. PSR-7 HTTP messages, middleware-first.
✨ Features
Few thousand lines. No magic. Start an app in five lines, ship in minutes.
Onion-style middleware. Auth, CORS, body parsing, error handling — all composable.
Standards-based request/response objects. Interchangeable with any PSR-7 ecosystem.
Bundled FastRoute matcher. Sub-millisecond routing for thousands of routes.
Bring your own PSR-11 container. PHP-DI, League/Container, or pure closures.