
30 wonderful libraries for PHP programmers
I offer readers of Habrahabr a translation of the publication 30 Amazing PHP Libraries for Programmers and Developers . The authors have compiled some amazing PHP libraries that will help you implement some cool stuff without a lot of effort. The purpose of the review is to present something new, so the list does not include popular libraries.

Goutte is used for website scraping and data mining. License - MIT. Provides an extensive API for crawling sites / blogs and retrieving data from HTML / XML.

GoogChart is a PHP class for creating dynamic charts using Google Charts. Does not apply to the entire Google Charts API, but makes them very easy to use.

The name speaks for itself. This is a PHP class that generates animated GIFs from multiple images. You just need to specify the images and the duration of their display, that's all. Size and transparency are determined by the first frame.

dBug is the PHP version of ColdFusion sfdump. It displays color and well-structured variable information in a table form. Styles can be edited, the table can be collapsed / expanded. dBug can also be forced to change the output of certain types of data. For example, you can configure the output of an object variable as an array.

Alice allows you to instantly generate hundreds of fake data (fixtures) for testing purposes. You can generate complex data with restrictions that are easy to read and edit. Lets you control fixture ranges, optional data, object values, and unique constraints.

PHPGeo is a simple library for measuring the distance between two coordinates with high accuracy. She uses the Gaversinus and Vincent formula to calculate the distance. You can integrate it with any application related to maps or locations.

If you plan to develop a geo aware application, take a look at Geocoder. This extensible PHP library is divided into 2 parts: Provider and HttpAdapter. It also offers an extra layer of abstraction for geocoding.

Purl is an object-oriented library for working with URLs. You can easily instantiate URLs and chain methods after creating the URL. The library supports path, fragment, and query manipulation.

Snappy allows you to create snapshots, thumbnails and PDFs by URL or HTML page. This library uses WebKit based on wkhtmltoimage and wkhtmltopdf, available for Windows, OSX and Linux.

ShellWrap is a library that allows you to use powerful Unix / Linux tools in PHP. You can easily invoke commands using simple syntax and error handling with PHP exceptions. All arguments are properly escaped, paths to executable files will be resolved automatically.

Unirest is a collection of lightweight HTTP libraries that are ideal for numerous applications. Performs PUT, DELETE, PATCH, GET, and POST requests. It supports gzip, basic authentication, file uploads, forms, custom timeouts, and default headers for each request.

IniScan is a tool designed to scan php.ini files for security. Searches for common security errors and reports results. You can set a threshold for scan rules to find errors above a specified level.

PHP Captcha can be used to generate audio and video captcha. Supports character rotation, font size selection, character set selection, random or specified background, additional display text and character shadow.

Ratchet is a loosely coupled PHP library that offers various tools for real-time development, bidirectional communication between the server and the client through WebSockets. There are many readily available components. You can write your own chat application in a few minutes.

TCPDF - PHP class (open) for creating PDF documents. It supports all standard page formats, custom page format, UTF-8, PDF annotations, including links, text rendering mode, font set, text stretching and spacing, page compression, TrueTypeUnicode and OpenTypeUnicode.

Munee library can be used to compile CoffieScript, Less, SCSS on the fly, resize images, compress JS & CSS, and cache the result on the server and client side, without changing the assets in the template. Overall, this is a good option to achieve lightning fast requests and conserve bandwidth.

HTML Purifier is an HTML filtering library designed to remove all malicious code. It can be used to protect code from XSS attacks. This library uses robust whitelisting, aggressive parsing, and makes sure that the markup results in standards.

Detector is an open library for determining numerous information about users / visitors. It can help you build accurate web analytics. It displays the user agent, the type of device used by the browser, along with its HTML and CSS capabilities. It also reports who requested the data - a person or a bot.

Whoops helps you deal with errors and exceptions in a less painful way. It provides an excellent interface that tells you detailed information about errors and exceptions that are present in the code (with highlighting). It also supports JSON, XML, SOAP, and AJAX.

Gaufrette provides an abstraction layer for the file system, which allows you to develop applications without having to know where and how the media files will be saved. It also allows you to change the location of files without changing the source code, in addition to determining the file system.

Imagine is a rich object-oriented library for working with images. It can handle various operations, such as opening, saving, creating, resizing, watermarking, creating a collage, making an image reflection, etc. Imagine's coordinate system allows you to draw various shapes on images. The color class helps you create RGB values for applying colors to images. It also supports layers and manipulations for animated GIFs.

Idiorm is a lightweight ORM and flexible query designer for PHP5, which is an add-on for PDO. You won’t have to write long and routine SQL queries with it. In addition, it does not require any XML settings, model classes, or code generators.

As the name implies, this is a highly efficient caching system. It is designed to accelerate dynamic web applications by reducing the load on the database. It supports several caching methods (the period can be explicitly defined), including MemCache, Memcached, files, wincache, mpdo, pdo and apc. You do not have to rewrite your PHP class for caching again, with changes on the servers.

JpGraph - PHP library for creating object-oriented graphs. It has more than 200 built-in country flags, 400 named colors and additionally supports Gantt charts, several Y-axes, alpha blending and internal caching (with a timeout). This library allows you to build line charts, histograms, pies, cards, candles, polar, radar, pie and contour charts of any size.
Read: 20+ Useful online charting and charting tools .

SEOstats is a powerful open source library that provides various SEO-related metrics, such as detailed analysis of backlinks, page rank, website trends, keywords, traffic statistics, Alexa rank and much more. She collects data from Alexa, Google, Moz, open site explorer, SEMRush, Facebook and Twitter.

PHP Parser is written in PHP to simplify static code analysis and manipulation. It converts the PHP source code into an abstract syntax tree. The syntax tree helps you easily analyze code problems and errors. In addition, you can turn the syntax tree back into PHP code. An example is shown in the image, where the white part represents a simple code, and the black part contains the generated syntax tree.

PHP Error is a library that is used to convert regular error messages to more visual ones with full syntax highlighting and with code fragments. It fixes some error messages that are simply incorrect and applicable to AJAX. In addition, you can manually turn it off or on, start separate sections without error messages, and ignore selected files.

PHP-CPP is a C ++ library that can be used to develop PHP extensions. It is built using easy-to-use and well-documented classes to create your own extensions for PHP. This can speed up your program because code written in C ++ runs faster than in PHP.

Eden is a set of reusable components that works with almost all PHP frameworks and CMS. It covers components for startup, cache, file systems, web services, templates, internationalization, payment systems and cloud technologies. Works with major web services including Google, Facebook, Yahoo, PayPal, Tumblr, Foursquare and Amazon Web Services.

Locust is an easy-to-use user load testing tool. It can be used to find out how many concurrent users the system will sustain. Allows you to write scripts in Python. Locust has an excellent interface (HTML + JS) that displays important data in real time.
30. Goutte

Goutte is used for website scraping and data mining. License - MIT. Provides an extensive API for crawling sites / blogs and retrieving data from HTML / XML.
29. GoogChart

GoogChart is a PHP class for creating dynamic charts using Google Charts. Does not apply to the entire Google Charts API, but makes them very easy to use.
28. GifCreator

The name speaks for itself. This is a PHP class that generates animated GIFs from multiple images. You just need to specify the images and the duration of their display, that's all. Size and transparency are determined by the first frame.
27. dBug

dBug is the PHP version of ColdFusion sfdump. It displays color and well-structured variable information in a table form. Styles can be edited, the table can be collapsed / expanded. dBug can also be forced to change the output of certain types of data. For example, you can configure the output of an object variable as an array.
26. Alice

Alice allows you to instantly generate hundreds of fake data (fixtures) for testing purposes. You can generate complex data with restrictions that are easy to read and edit. Lets you control fixture ranges, optional data, object values, and unique constraints.
25. PHPGeo

PHPGeo is a simple library for measuring the distance between two coordinates with high accuracy. She uses the Gaversinus and Vincent formula to calculate the distance. You can integrate it with any application related to maps or locations.
24. Geocoder

If you plan to develop a geo aware application, take a look at Geocoder. This extensible PHP library is divided into 2 parts: Provider and HttpAdapter. It also offers an extra layer of abstraction for geocoding.
23. Purl

Purl is an object-oriented library for working with URLs. You can easily instantiate URLs and chain methods after creating the URL. The library supports path, fragment, and query manipulation.
22. Snappy

Snappy allows you to create snapshots, thumbnails and PDFs by URL or HTML page. This library uses WebKit based on wkhtmltoimage and wkhtmltopdf, available for Windows, OSX and Linux.
21. ShellWrap

ShellWrap is a library that allows you to use powerful Unix / Linux tools in PHP. You can easily invoke commands using simple syntax and error handling with PHP exceptions. All arguments are properly escaped, paths to executable files will be resolved automatically.
20. Unirest

Unirest is a collection of lightweight HTTP libraries that are ideal for numerous applications. Performs PUT, DELETE, PATCH, GET, and POST requests. It supports gzip, basic authentication, file uploads, forms, custom timeouts, and default headers for each request.
19. IniScan

IniScan is a tool designed to scan php.ini files for security. Searches for common security errors and reports results. You can set a threshold for scan rules to find errors above a specified level.
18. PHP Captcha

PHP Captcha can be used to generate audio and video captcha. Supports character rotation, font size selection, character set selection, random or specified background, additional display text and character shadow.
17. Ratchet

Ratchet is a loosely coupled PHP library that offers various tools for real-time development, bidirectional communication between the server and the client through WebSockets. There are many readily available components. You can write your own chat application in a few minutes.
16. TCPDF

TCPDF - PHP class (open) for creating PDF documents. It supports all standard page formats, custom page format, UTF-8, PDF annotations, including links, text rendering mode, font set, text stretching and spacing, page compression, TrueTypeUnicode and OpenTypeUnicode.
15. Munee

Munee library can be used to compile CoffieScript, Less, SCSS on the fly, resize images, compress JS & CSS, and cache the result on the server and client side, without changing the assets in the template. Overall, this is a good option to achieve lightning fast requests and conserve bandwidth.
14. HTML Purifier

HTML Purifier is an HTML filtering library designed to remove all malicious code. It can be used to protect code from XSS attacks. This library uses robust whitelisting, aggressive parsing, and makes sure that the markup results in standards.
13. Detector

Detector is an open library for determining numerous information about users / visitors. It can help you build accurate web analytics. It displays the user agent, the type of device used by the browser, along with its HTML and CSS capabilities. It also reports who requested the data - a person or a bot.
12. Whoops

Whoops helps you deal with errors and exceptions in a less painful way. It provides an excellent interface that tells you detailed information about errors and exceptions that are present in the code (with highlighting). It also supports JSON, XML, SOAP, and AJAX.
11. Gaufrette

Gaufrette provides an abstraction layer for the file system, which allows you to develop applications without having to know where and how the media files will be saved. It also allows you to change the location of files without changing the source code, in addition to determining the file system.
10. Imagine

Imagine is a rich object-oriented library for working with images. It can handle various operations, such as opening, saving, creating, resizing, watermarking, creating a collage, making an image reflection, etc. Imagine's coordinate system allows you to draw various shapes on images. The color class helps you create RGB values for applying colors to images. It also supports layers and manipulations for animated GIFs.
9. Idiorm

Idiorm is a lightweight ORM and flexible query designer for PHP5, which is an add-on for PDO. You won’t have to write long and routine SQL queries with it. In addition, it does not require any XML settings, model classes, or code generators.
8. phpFastCache

As the name implies, this is a highly efficient caching system. It is designed to accelerate dynamic web applications by reducing the load on the database. It supports several caching methods (the period can be explicitly defined), including MemCache, Memcached, files, wincache, mpdo, pdo and apc. You do not have to rewrite your PHP class for caching again, with changes on the servers.
7. JpGraph

JpGraph - PHP library for creating object-oriented graphs. It has more than 200 built-in country flags, 400 named colors and additionally supports Gantt charts, several Y-axes, alpha blending and internal caching (with a timeout). This library allows you to build line charts, histograms, pies, cards, candles, polar, radar, pie and contour charts of any size.
Read: 20+ Useful online charting and charting tools .
6. SEOstats

SEOstats is a powerful open source library that provides various SEO-related metrics, such as detailed analysis of backlinks, page rank, website trends, keywords, traffic statistics, Alexa rank and much more. She collects data from Alexa, Google, Moz, open site explorer, SEMRush, Facebook and Twitter.
5. PHP Parser

PHP Parser is written in PHP to simplify static code analysis and manipulation. It converts the PHP source code into an abstract syntax tree. The syntax tree helps you easily analyze code problems and errors. In addition, you can turn the syntax tree back into PHP code. An example is shown in the image, where the white part represents a simple code, and the black part contains the generated syntax tree.
4. PHP Error

PHP Error is a library that is used to convert regular error messages to more visual ones with full syntax highlighting and with code fragments. It fixes some error messages that are simply incorrect and applicable to AJAX. In addition, you can manually turn it off or on, start separate sections without error messages, and ignore selected files.
3. PHP-CPP

PHP-CPP is a C ++ library that can be used to develop PHP extensions. It is built using easy-to-use and well-documented classes to create your own extensions for PHP. This can speed up your program because code written in C ++ runs faster than in PHP.
2. Eden

Eden is a set of reusable components that works with almost all PHP frameworks and CMS. It covers components for startup, cache, file systems, web services, templates, internationalization, payment systems and cloud technologies. Works with major web services including Google, Facebook, Yahoo, PayPal, Tumblr, Foursquare and Amazon Web Services.
1. Locust

Locust is an easy-to-use user load testing tool. It can be used to find out how many concurrent users the system will sustain. Allows you to write scripts in Python. Locust has an excellent interface (HTML + JS) that displays important data in real time.