Slim is a PHP micro-framework that helps you quickly write simple yet powerful web applications and APIs.
Slim addresses the need for a lightweight, focused framework that avoids the overhead of full-stack solutions. It works by providing a minimal core for routing and middleware handling, built on PSR-7 HTTP message standards and PSR-15 middleware specifications. The framework requires you to choose a PSR-7 implementation separately—options include Slim-Psr7, httpsoft, Nyholm, Guzzle, or Laminas implementations—giving you control over performance characteristics and feature trade-offs. The tool includes optional Slim-Http decorators that enhance any PSR-7 implementation with additional convenience methods, automatically applied when installed.
Slim suits developers building APIs or simple web applications where a minimal footprint matters more than built-in batteries. It works well for projects where you want to select your own components rather than accept framework defaults. The framework requires PHP 7.4 or newer and installation via Composer. Choose it if you prefer explicit dependency choices and standards-based architecture over convention-driven frameworks.
The project maintains an active test suite and accepts community contributions through a defined process. Development follows established PHP standards and remains focused on the micro-framework scope without feature creep.