Medoo is a compact PHP package for talking to SQL databases through a simple API. It supports many engines via PDO and installs with Composer.
Overview
Medoo is a lightweight PHP database framework meant to speed up application development. It is distributed as a small, single-file style package with minimal dependencies.
The API is intended to stay readable while still supporting complex SQL, data mapping, and prepared statements. It works with PDO and is compatible with MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, Oracle, Sybase, and other supported engines.
Developers install it through Composer by adding it to composer.json and updating dependencies. PHP 7.3 or later and an enabled PDO extension are required.
Medoo fits alongside PHP frameworks such as Laravel, CodeIgniter, Yii, and Slim rather than replacing them, acting as a focused database layer within larger applications.
Key features
- Minimal single-file style package
- PDO-based database access
- Prepared statements support
- Multi-engine SQL compatibility
- Composer installation
- Readable query API
- Data mapping helpers
- Works with common PHP frameworks
Use cases
- Quick SQL access in PHP apps
- Small projects needing PDO helpers
- Database layer inside Laravel or Yii
- Cross-engine portable PHP code
- Readable complex queries