In this article we will explore the most awesome PHP libraries, examples, apps as well as resources. All of them are open source.
Composer Repositories
Composer Repositories.
Magento Module Composer Repository.
The PHP Package Repository.
Composer package archive as a service for PHP.
Manage your plugins with Composer.
Dependency Management
Libraries for dependency and package management.
A multi framework Composer library installer.
A package and dependency manager.
A PHAR manager.
A PHP extension installer.
Dependency Management Extras
Extras related to dependency management.
A library to parse your project's Composer environment at runtime.
A composer plugin to merge several composer.json
files.
A plugin for normalising composer.json
files.
A plugin for Composer to apply patches.
CLI tool to analyze composer dependencies and verify that no unknown symbols are used in the sources of a package.
A CLI Tool to scan for unused composer packages.
A composer plugin which enables parallel install process.
A private PHP package repository manager and Packagist proxy.
A static Composer repository generator.
A library to manage PHAR files in project using Composer.
A static Composer repository and proxy.
Frameworks
Web development frameworks.
A rapid application development framework.
A framework comprised of individual components (previously Zend Framework
A web application framework with expressive, elegant syntax.
A web framework comprised of mature components.
A framework implemented as a C extension.
A high performance PHP/Go framework.
A set of reuseable components and a web framework.
A fast, secure, and efficient web framework.
Framework Extras
Extras related to web development frameworks.
A Rapid Application Development (RAD
A set of Rapid Application Development (RAD
Glue for using Swoole in Laravel or Lumen.
A Content Management Framework to create custom CMS.
Content Management Systems (CMS
Tools for managing digital content.
A CMS targeting small-to-medium sized business and non-profits (a fork of Drupal
A CMS targeting users with a minimum of technical skills.
A flexible, user-friendly CMS for creating custom digital experiences on the web and beyond.
An enterprise level CMS.
A modern flat-file CMS.
Another leading CMS.
A flat-file CMS that adapts to any project.
The most popular ecommerce platform.
An open-source learning platform.
A stupidly simple, blazing fast, flat file CMS.
Build beautiful, easy to manage websites.
A blogging platform and CMS.
Components
Standalone components from web development frameworks and development groups.
Independent components, fully decoupled from each other and from any framework.
A directory of CakePHP plugins.
Another package of PHP components.
The Laravel Framework components.
A PHP package development group.
A collection of open source PHP and Laravel packages.
The components that make Symfony.
The components that make the Laminas Framework.
Micro Frameworks
Micro frameworks and routers.
A micro-framework for console applications.
A micro-framework by Laravel.
A micro-framework by Laminas.
An Action-Domain-Responder implementation for PHP.
A micro-framework for CLI applications.
Another simple micro framework.
Micro Framework Extras
Extras related to micro frameworks and routers.
A skeleton for Slim.
Integrate Twig into Slim.
A simple PHP renderer for Slim.
Routers
Libraries for handling application routing.
A full-featured routing library.
A fast routing library.
A flexible router.
Another fast routing library.
A routing library built on top of Fast Route.
Templating
Libraries and tools for templating and lexing.
A PHP implementation of the HAML template language.
A PHP implementation of the Mustache template language.
A PHP implementation of the [TAL](https://en.wikipedia.org/wiki/Template_Attribute_Language
A native PHP templating library.
A template engine to complement PHP.
A comprehensive templating language.
Static Site Generators
Tools for pre-processing content to generate web pages.
Couscous turns Markdown documentation into beautiful websites. It's GitHub Pages on steroids.
Simple static sites with Laravel's Blade.
A tool that converts Markdown and Twig into static HTML.
An extensible tool that converts Markdown and Twig into HTML.
HTTP
Libraries for working with HTTP.
Another HTTP client.
A comprehensive HTTP client.
An HTTP client abstraction without binding to a specific implementation.
A super lightweight PSR-7 implementation. Very strict and very fast.
A library for recording and replaying HTTP requests.
A simple HTTP library.
A library to ease creation of REST API clients.
A component to fetch HTTP resources synchronously or asynchronously.
PSR-7 HTTP Message implementation.
Scraping
Libraries for scraping websites.
Instrument headless Chrome/Chromium instances from PHP.
A super fast HTML scrapper and parser.
An information extractor from any web service or page.
A simple web scraper.
A browser testing and web crawling library for PHP and Symfony.
A configurable and extensible PHP web spider.
Middlewares
Libraries for building application using middlewares.
Inspiring collection of handy middlewares.
A PHP 5.5 PSR-7 middleware dispatcher.
A library of stackable middleware for Symfony.
Middleware for PHP built on top of PSR-7.
URL
Libraries for parsing URLs.
A domain suffix parser library.
A URL manipulation library.
A functional URI manipulation library.
Another URL manipulation library.
Libraries for sending and parsing email.
A library to inline CSS in email templates.
An email reply parser library.
A small email address validation library.
An IMAP library.
Email marketing automation
Another mailer solution.
A library to access mailboxes via POP3, IMAP and NNTP.
A library for email services such as [SendGrid](https://sendgrid.com/
A mailer solution.
A powerful library for creating and sending emails.
Files
Libraries for file manipulation and MIME type detection.
A CSV data manipulation library.
Abstraction for local and remote filesystems.
A filesystem abstraction layer.
Another MIME detection library.
A wrapper for the [FFmpeg](https://www.ffmpeg.org/
A unified reader and writer of compressed archives.
Streams
Libraries for working with streams.
An asynchronous stream abstraction.
A simple object-orientated stream wrapper library.
Dependency Injection
Libraries that implement the dependency injection design pattern.
A serializable dependency injection container with constructor and setter injection, interface and trait awareness, configuration inheritance, and much more.
A common interface to dependency injection containers and service locators.
A recursive dependency injector.
Another flexible dependency injection container.
A PSR-11 compatible, annotation-based dependency injection container.
A dependency injection container that supports autowiring.
A tiny dependency injection container.
A dependency injection container component.
Imagery
Libraries for manipulating images.
A library for extracting colours from images.
An on-demand image manipulation library.
A library for generating perceptual image hashes.
A library for optimizing images.
An image manipulation library.
Another image manipulation library.
Another image manipulation library.
Testing
Libraries for testing codebases and generating test data.
An expressive fixture generation library.
A mocking framework for PHPUnit/Codeception.
A simple testing library.
A behaviour driven development (BDD
A full stack testing framework.
A fake data generator library.
A library for mocking HTTP requests in unit tests.
An AST-based PHP Mutation testing framework.
Full stack Unit/BDD testing framework with built-in stub, mock and code-coverage support.
Web acceptance testing.
A mock object library for testing.
A parallel testing library for PHPUnit.
A testing framework with a focus on simplicity.
An event driven test framework.
Another mock object library for testing.
Another behaviour driven development testing framework.
A mock library for built-in PHP functions (e.g. time(
A MySQL engine written in pure PHP.
A design by specification unit testing library.
A test tool used by PHP itself.
A unit testing framework.
A highly opinionated mocking framework.
A virtual filesystem stream wrapper for testing.
Continuous Integration
Libraries and applications for continuous integration.
A continuous integration platform.
Let GitLab CI test, build, deploy your code. TravisCi like.
A continuous integration platform with [PHP support](https://www.jenkins.io/solutions/php/
A continuous integration client written in PHP and powered by Docker.
An open source continuous integration platform for PHP.
A continuous integration platform for open source and private projects.
A Docker based continious integration platform for open source and private projects.
A continuous integration platform.
A GitHub Action for PHP.
Documentation
Libraries for generating project documentation.
Another API documentation generator.
A documentation generator which uses Markdown files.
A documentation generator.
A documentation generator for PHP projects (that is not limited to API documentation
Security
Libraries for generating secure random numbers, encrypting data and scanning and testing for vulnerabilities.
A simple library for encryption using [libsodium](https://github.com/jedisct1/libsodium
A standards compliant HTML filter.
A tool that scans PHP INI files for security.
Id obfuscation based on Knuth's multiplicative hashing method.
A library of PHP unserializeable payloads along with a tool to generate them.
Secure PHP Encryption Library.
An experimental object orientated SSH wrapper library.
A pure PHP secure communications library.
PHP 5.x support for `random_bytes(
A library for generating random numbers and strings.
A web tool to check your Composer dependencies for security advisories, previously known as "SensioLabs Security Check".
An automatic SQL injection and database takeover tool.
A simple encrypted key-value storage library.
A continuous security testing platform for web applications.
An integrated penetration testing tool for web applications.
Passwords
Libraries and tools for working with and storing passwords.
A library for generating secure random passphrases.
A compatibility library for the new PHP 5.5 password functions.
A password policy library for PHP and JavaScript.
A library for validating and upgrading password hashes.
PHP library to generate random passwords.
A library for generating and validating passwords.
A portable password hashing framework.
A realistic PHP password strength estimate library based on Zxcvbn JS.
Code Analysis
Libraries and tools for analysing, parsing and manipulating codebases.
AST-based reflection library that allows analysis and manipulation of code
An automated code review.
A PHP code-quality tool.
A PHP parser written in PHP.
A command line utility that compares two source sets and determines the appropriate semantic versioning to apply.
PHP completion, refactoring and introspection tool.
A tool for quickly measuring the size of a PHP project.
A tool for running QA tools (phploc, phpcpd, phpcs, pdepend, phpmd, phpmetrics
A tool to visualize metrics and source code.
A tool to upgrade and refactor code.
A web tool to [scrutinise PHP code](https://github.com/scrutinizer-ci/php-analyzer
A simple micro benchmark library.
Code Quality
Libraries for managing code quality, formatting and linting.
An easy-to-use and flexible Git hook library.
A library that detects PHP, CSS and JS coding standard violations.
A coding standards fixer library.
A library that scans code for bugs, sub-optimal code, unused parameters and more.
A tool to help adhere to certain coding conventions.
A library that detects copied and pasted code.
Static Analysis
Libraries for performing static analysis of PHP code.
A static analysis engine for PHP.
A static code analysis tool that helps to enforce rules for dependencies between software layers.
A code analysis tool using Graph Theory.
A static analyzer based on PHP 7+ and the php-ast extension.
Easy to use architecture testing tool for PHP.
A PHP compatibility checker for PHP CodeSniffer.
A tool to create customisable dependency graphs.
A static metric library.
A static analyzer for PHP version migration.
A PHP Static Analysis Tool.
A static analysis tool for finding errors in PHP applications.
Architectural
Libraries related to design patterns, programming approaches and ways to organize code.
A repository of software patterns implemented in PHP.
A simple PHP finite state machine.
A functional programming library.
A library that provides iteration primitives using generators.
A library for redefining userland functions.
A pipeline pattern implementation.
Data import abstraction library for consuming Web APIs and other data sources.
A simple stateless production rules engine.
A powerful rule engine and implementation of the Specification pattern.
Debugging and Profiling
Libraries and tools for debugging errors and profiling code.
Monitoring extension collecting errors and statistics into SQLite/MySQL/StatsD.
Another web debugging console using Google Chrome.
A low-overhead code profiler.
A debugging and profiling tool.
A simple metrics API library.
A self contained code coverage compatible driver.
A web debugging console.
A debugging toolbar.
A benchmarking Framework.
A low-overhead sampling profiler.
A variable dumper component.
Monitoring and profiling tool.
A simple error detection, logging and time measuring library.
A pretty error handling library.
A debug and profile tool for PHP.
A profiling tool originally developed by Facebook.
A debug and profile tool for Zend Server.
Build Tools
Project build and automation tools.
A utility to build PHAR files.
A PHP project/micro-package generator.
A PHP project build system inspired by Apache Ant.
A library for versioning and releasing software.
Task Runners
Libraries for automating and running tasks.
A PHP Task runner built on Symfony components.
A PHP cron job manager without modifying crontab.
A PHP Task runner with object-orientated configurations.
A pure PHP task runner inspired by Grunt and Gulp.
Tools for building navigation structures.
A menu library.
A flexible menu library with a fluent interface.
Asset Management
Tools for managing, compressing and minifying website assets.
A JavaScript minifier library.
An elegant wrapper around Webpack for the 80% use case.
Manages URL generation and versioning of web assets.
A simple but powerful API for processing and compiling assets built around Webpack.
Geolocation
Libraries for geocoding addresses and working with latitudes and longitudes.
A list of all countries with names and ISO 3166-1 codes.
A geocoding library.
A GeoJSON implementation.
A library of geo-related tools.
A simple geo library.
Date and Time
Libraries for working with dates and times.
A calendar management library.
A simple DateTime API extension.
A DateTime API extension supporting both mutable and immutable date/time.
Moment.js inspired PHP DateTime handler with i18n support.
An library to help you calculate the dates and names of holidays.
Event
Libraries that are event-driven or implement non-blocking event loops.
An event driven non-blocking I/O library.
An event source and CQRS library.
An event dispatcher library.
Yet another web socket library.
An event dispatcher library.
An event library with a focus on domain events.
An event source library.
Another web socket library.
An asynchronous web socket client.
An event source component to persist event messages
Golang's defer statement for PHP.
A web socket library.
An event driven non-blocking I/O library.
A reactive extension library.
An event-driven asynchronous and concurrent networking communication framework with high performance for PHP written in C.
An event driven non-blocking I/O library.
Logging
Libraries for generating and working with log files.
A comprehensive logger.
E-commerce
Libraries and applications for taking payments and building online e-commerce stores.
A PHP implementation of Fowler's money pattern.
A money library for PHP, with support for contexts, cash roundings, currency conversion.
A framework agnostic multi-gateway payment processing library.
A payment abstraction library.
Highly customizable e-commerce software
An exchange rates library.
An open source e-commerce solution.
Libraries and software for working with PDF files.
A HTML to PDF converter.
A library for generating PDFs and images from XML.
A PDF and image generation library.
A tool to convert HTML to PDF.
Office
Libraries for working with office suite documents.
A library for working with Microsoft PowerPoint Presentations.
A library for working with Microsoft Word documents.
A pure PHP library for reading and writing spreadsheet files (successor of PHPExcel
Read and write spreadsheet files (CSV, XLSX and ODS
Database
Libraries for interacting with databases using object-relational mapping (ORM) or datamapping techniques.
A data mapper implementation for your persistence model in PHP.
Provides an extension to the native PDO along with a profiler and connection locator.
Independent query builders for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.
A nested set implementation for Eloquent.
Object-Relational Mapper, implemented using the DataMapper pattern.
PHP DataMapper, ORM.
A collection of Doctrine behavioural extensions.
A comprehensive DBAL and ORM.
A simple ORM.
An Object Model Manager for PostgreSQL.
A set of utilities to generate proxy objects for data mappers.
A lightweight, configuration-less ORM.
An easy dumper tool for MySQL.
A MySQL datamapper ORM.
Migrations
Libraries to help manage database schemas and migrations.
A migration library for Doctrine.
A migration management library.
Another database migration library.
Another migration management library.
Database migrations for PHP ala ActiveRecord Migrations with support for MySQL, Postgres, SQLite.
NoSQL
Libraries for working with "NoSQL" backends.
A MongoDB ORM.
A feature complete Redis library.
Queue
Libraries for working with event and task queues.
A multibackend abstraction library.
A performant pure-PHP AMQP (RabbitMQ
A Beanstalkd client library.
A pure PHP AMQP library.
PHP bindings for Tarantool Queue.
A RabbitMQ pattern library.
A message queue packages for PHP that supports RabbitMQ, AMQP, STOMP, Amazon SQS, Redis and Doctrine transports.
Search
Libraries and software for indexing and performing search queries on data.
A client library for ElasticSearch.
The official client library for [ElasticSearch](https://www.elastic.co/
A client library for [Solr](https://lucene.apache.org/solr/
A query library for the [Sphinx](https://sphinxsearch.com/
Command Line
Libraries related to the command line.
Provides the equivalent of request ( Context
A tiny PHP REPL.
A micro framework for building command line tools.
A library for building CLI menus.
A command-line framework supports zsh/bash completion generation, subcommands and option constraints. It also powers phpbrew.
A library for outputting colours and special formatting.
Another simple command line opt parser.
A library to calculate cron run dates.
A command line opt parser.
Another command line opt parser.
Another command line library.
Another PHP REPL.
A simple command line wrapper library.
Authentication and Authorization
Libraries for implementing user authentication and authorization.
Provides authentication functionality and session tracking using various adapters.
An open source social sign (OAuth1\OAuth2\OpenID\OpenIDConnect
Json Tokens to authenticate and transmit information.
An OAuth 1.0 client library.
An OAuth 2.0 client library.
Another OAuth2 server implementation.
An OAuth2 authentication server, resource server and client library.
A multi-provider authentication framework.
Platform-Agnostic Security Tokens.
Another OAuth library.
A library for social network authentication.
A framework agnostic authentication & authorisation library.
A Twitter OAuth library.
Markup and CSS
*Libraries for working with markup and CSS formats.
An fast and extensible Markdown parser.
Highly-extensible Markdown parser which fully supports the [CommonMark spec](https://spec.commonmark.org/
A lightweight markup parser library.
A library for extracting web media.
An Oembed consumer library.
Converts HTML into Markdown.
An HTML5 parser and serializer library.
Another Markdown parser.
A Parser for CSS Files written in PHP.
A Markdown parser.
A [Shiki](https://github.com/shikijs/shiki
A library for parsing VCard and iCalendar objects.
JSON
Libraries for working with JSON.
A JSON lint utility.
A library for mapping JSON to PHP objects.
Strings
Libraries for parsing and manipulating strings.
A PHP desktop/mobile user agent parser, based on Mobiledetect.
An ANSI to HTML5 converter library.
A library for manipulating and converting colours.
Another library for parsing user agent strings.
Another UTF-8 string library.
A PHP port of Python's jieba. Chinese text segmentation for natural language processing.
A lightweight PHP class for detecting mobile devices (including tablets
A portable library for working with UTF-8 strings.
A string manipulation library with UTF-8 safe replacement methods.
A library to convert strings to slugs.
A library for formatting SQL statements.
A string manipulation library with multibyte support.
A library for parsing user agent strings.
A PHP port of Django's URLify.js.
A library for generating UUIDs.
Numbers
Libraries for working with numbers.
A library providing large number support: BigInteger
, BigDecimal
and BigRational
.
A library to parse, format and convert byte units in binary and metric systems.
A value object to handle decimals/floats easily and more precisely.
An immutable value object for working with IPv4 and IPv6 addresses.
A PHP implementation of Google's phone number handling library.
Another library for converting between units of measure.
A library for converting between units of measure.
A math library for PHP.
Filtering and Validation
Libraries for filtering and validating data.
A validation library with a rich set of assertions. Supports assertion chaining and lazy assertions.
Provides tools to validate and sanitize objects and arrays.
Another validation library.
A simple PHP filtering library.
A library for validating inputs according standards from ISO, International Finance, Public Administrations, GS1, Book Industry, Phone numbers & Zipcodes for many countries.
A [JSON Schema](https://json-schema.org/
A schema validation library that supports YAML, JSON and XML.
A simple validation library.
A library for handling file uploads and validation.
Another validation library.
Another simplified validation library.
API
Libraries and web tools for developing APIs.
Expose in minutes an hypermedia REST API that embraces JSON-LD, Hydra format.
An API builder built with the Laminas Framework.
A library for exposing Doctrine entities as REST resource endpoints.
A Hypertext Application Language (HAL
A HATEOAS REST web service library.
A content negotiation library.
A lightweight framework to expose PHP methods as RESTful web API.
A tool to generate PHP classes from SOAP WSDL files.
Caching and Locking
Libraries for caching data and acquiring locks.
A thin PSR-6 cache wrapper to various caching backends emphasising cache tagging and indexing.
A tool to clear APC/opcode caches from the command line.
A caching library.
A caching library.
Cache slam defense using a semaphore to prevent dogpile effect.
Another library for caching.
Another caching library.
A lock library to provide exclusive execution.
Data Structure and Storage
Libraries that implement data structure or storage techniques.
A simple collections library.
A library for converting complex data structures to JSON output.
Another PHP library based on .NET's LINQ.
A library that maps nested JSON structures onto PHP classes.
Provides iteration over huge JSONs using simple foreach
Collection library inspired by Clojure's sequences.
A pure PHP implementation of the [MessagePack](https://msgpack.org/
A PHP library based on .NET's LINQ (Language Integrated Query
A library for serialising and de-serialising data.
Yet Another LINQ to Objects for PHP.
Another library for serialising and de-serialising data.
Notifications
Libraries for working with notification software.
A cross-platform library for desktop notification (support for Growl, notify-send, toaster, etc
A standalone library for device push notifications.
A library for handling push notifications.
A lightweight notification library.
A PHP Library to easily send push notifications with the Pushwoosh REST Web Services.
Deployment
Libraries for project deployment.
A deployment tool.
A tool to run SSH tasks with PHP.
A fast and easy deployer for the PHP world.
Internationalisation and Localisation
Libraries for Internationalization (I18n) and Localization (L10n).
Provides internationalization (I18N
Message translation and localization for dates and numbers.
Serverless
Libraries and tools to help build serverless web applications.
Serverless PHP on AWS Lambda.
An open-source serverless cloud platform.
An open-source framework for building serverless applications.
A serverless deployment platform for Laravel, powered by AWS.
Configuration
Libraries and tools for configuration.
Parse and load environment variables from .env
files.
- Symfony Dotenv- Parse and load environment variables from
.env
files. - Yo! Symfony TOML
A PHP parser for [TOML](https://github.com/toml-lang/toml
Third Party APIs
Libraries for accessing third party APIs.
The official PHP AWS SDK library.
An unofficial asynchronous PHP AWS SDK.
The official Campaign Monitor PHP library.
A library to interface with the Github API.
The official Square PHP SDK for payments and other Square APIs.
The official Stripe PHP library.
The official Twilio PHP REST API.
Extensions
Libraries to help build PHP extensions.
A C++ library for developing PHP extensions.
A compiled language between PHP and C++ for developing PHP extensions.
Miscellaneous
Useful libraries or utilities that don't fit into the categories above.
An annotation library (part of Doctrine
A framework agnostic PHP library to build cross-platform chat bots.
A library for optimising autoloading.
A cross-language RPC.
Helper for Google's noCAPTCHA (reCAPTCHA
A pagination library.
All PHP functions, rewritten to throw exceptions instead of returning false.
A library that allows Closures to be serialized.
Software
Software for creating a development environment.
PHP Installation
Tools to help install and manage PHP on your computer.
Brew PHP switcher.
A package manager for OSX.
A development environment for macOS.
A PHP version manager and installer.
Another PHP version installer.
A PHP installer for OSX.
Development Environment
Software and tools for creating and sharing a development environment.
A radically simple orchestration framework.
A containerization platform.
Easily install PHP extensions in Docker containers.
An open source PHP tunneling service.
Push-button development environments.
A local development environment for Laravel.
A full PHP development environment based on Docker.
A server automation framework and application.
A Docker-based development-only dependency manager.
A portable development environment utility.
Virtual Machines
Alternative PHP virtual machines.
A programming language for HHVM.
A Virtual Machine, Runtime and JIT for PHP by Facebook.
PHP compiler and runtime for .NET and .NET Core.
Text Editors and IDEs
Text Editors and Integrated Development Environments (IDE) with support for PHP.
A PHP IDE based on the Eclipse platform.
An IDE with support for PHP and HTML5.
A commercial PHP IDE.
An open source code editor.
Web Applications
Web-based applications and tools.
An online PHP & HHVM shell.
Database management in a single PHP file.
The open source status page system.
A database version control application.
An easy to use and great looking photo-management-system.
A web tool for capturing and viewing emails.
A web interface for MySQL/MariaDB.
An application for managing queueing backends.
A simple web interface to manage [Redis](https://redis.io/
An online IDE for PHP in the browser.
Infrastructure
Infrastructure for providing PHP applications and services.
A multithreaded application server for PHP, written in PHP.
A process manager, supercharger and load balancer for PHP applications.
High-performance PHP application server