Never Ending Security

It starts all here

30 Amazing PHP Libraries for Programmers and Developers

PHP (Hypertext Preprocessor) is used as a general programming language for web development. It’s a server site scripting language that powers roughly 240 million websites. The PHP source code can be implemented with HTML code, or it can be used with various web frameworks, template engines and standalone graphical applications. Facebook, Wikipedia, WordPress are few popular websites that are built on PHP.

PHP Libraries allow programmers to take complete advantage of object oriented approach. PHP has many inbuilt library API, for example cURL. The best thing about PHP is it’s a free source where anyone can make his/her own library for others to use.
We have gathered few amazing PHP libraries which will help you do some cool stuff without putting much effort. Just import them to test and furnish your coding experience.

The aim is to introduce new and unknown stuff, that's why the list doesn't include popular libraries.

30. Goutte


Goutte is used for scraping website and extracting data, licensed under MIT license. It offers a great API to crawl websites/blogs and extract data from HTML/XML resources.

29. GoogChart


GoogChart is a PHP class designed for creating and maintaining dynamic charts through Google charts. It doesn’t cover whole Google charts API but makes it very simple to use it.

28. GifCreator


The name says it all. It’s a PHP class that generates animated GIF from multiple images. You just need to provide images and their duration, that’s it. Moreover, the dimension and transparency of output are based on the first frame.

27. dBug


dBug is the PHP version of ColdFusion’s sfdump. It displays colored and well-structured tabular variable information. Stylesheet can be edited and table can be expanded/collapsed. dBug also has the ability to force certain types of outputs. For example, you can force an array type variable to be outputted as an object variable.

26. Alice


Alice allows you to generate hundreds of fake data (fixtures) instantly for testing purpose. You can produce complex data with constraints that can be read or edit easily. It lets you control fixture ranges, optional data, object value and unique constraints.

25. PHPGeo


PHPGeo is a simple library for measuring distance between two coordinates with high precision. It uses Haversine and Vincenty’s formula to calculate the distance. You can integrate this with any app related to maps or locations.

24. Geocoder


If you are planning to develop any geo aware application then you should take a look at Geocoder. It’s an extensible PHP library split into 2 parts: Provider and HttpAdapter. It also offers an abstraction layer for geocoding manipulation.

23. Purl


Purl is an Object Oriented library for URL manipulation. You can create URL instances easily and chain methods together after creating the URL. The library supports path, fragment and query manipulation.

22. Snappy


Snappy lets you generate snapshot, thumbnail and PDF from a URL or HTML page. This library uses the 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 within PHP. You can easily pipe commands together, use simple syntax and capture error as PHP exception. All arguments are properly escaped and paths to binaries are resolved automatically.

20. Unirest


Unirest is a collection of lightweight HTTP libraries which is ideal for numerous applications. Make PUT, DELETE, PATCH, GET and POST requests. It supports gzip, basic authentication, file upload, form parameters and custom body entities like timeout and default header for each request.

19. IniScan


IniScan is a tool designed for scanning PHP INI files for security. It searches for common security errors and report back results. You can also request the scan files only that are above threshold.

18. PHP Captcha


PHP Captcha can be used for generating audio and visual CAPTCHAs. It supports character rotation, font size selection, character set selection, random or custom background, optional display text and character shadow.

17. Ratchet


Ratchet is a loosely coupled PHP library that offers various tools to develop real time, bidirectional applications between servers and clients over WebSockets. There are many components available to easily add functionality. You can write your own chat application within minutes.



TCPDF is a PHP class (open source) for generating PDF documents. It supports all standard page formats, custom page format, UTF-8 unicode, PDF annotation including links, text rendering mode, font subsetting, text stretching & spacing, page compression, TrueTypeUnicode and OpenTypeUnicode.

15. Munee


Munee library can be used to compile CoffieScript, LESS, SCSS, resize image, minify JS & CSS, and cache assets on both server and client side, without changing the assets in template. Overall, this is a good option for achieving lightning fast requests and saving your bandwidth.

14. HTML Purifier

HTML Purifier

HTML purifier is an HTML filtering library developed for removing all malicious code. It can be used for protecting your code from XSS attacks. This library uses combination of robust whitelists, aggressive parsing and makes sure that the resulting markup is standards compliant.

13. Detector


Detector is an open source library for detecting numerous information of users/visitors. It can help you to build accurate web analytics. It displays user agent, device type, browser used along with its HTML and CSS capabilities. It also tells whether the data is fetched by human or robot bot.

12. Whoops


Whoops helps you to deal with errors and exception in a less painful way. It provides a great error interface that tells you details of errors & exception present in the code (with line highlight). Moreover, it supports JSON, XML, SOAP and AJAX.

11. Gaufrette


Gaufrette provides a filesystem abstraction layer which permits you to develop your application without the need to know where and how media files will be stored. It also allows you to update file locations without altering the source code apart from the definition of filesystem.

10. Imagine


Imagine is a rich object oriented library for image manipulation. It can handle various operations like open, save, create, resize, watermark, create collage, apply image reflection filter etc. Imagine’s coordinate system allows you to draw different shapes on images. The color class helps you to generate RGB value to apply colors to images. It also supports layer and animated GIF manipulation.

9. Idiorm


Idiorm is a lightweight object relational mapper and fluent query builder for PHP5, which is built on top of PDO. With it, you don’t need to write long and routine SQL. Moreover, it requires no XML configuration, no model classes and no code generation.

8. phpFastCache


As the name suggests, it is the high performance object caching system. It is designed to speed up dynamic web applications by reducing database load. It supports multiple caching methods (period can be defined explicitly) including memcache, memcached, files, wincache, mpdo, pdo and apc. You don’t have to write your PHP caching class again whenever you change servers.

7. JpGraph


JpGraph is a PHP library for creating object oriented graphs. It has over 200 built in country flag, 400 named colors and supports advanced Gantt chart, multiple Y-axis, alpha blending and internal caching (with timeout). This library allows you to create line, bar, pie, map, stock, polar, radar, balloon and contour charts of any size.

  1. SEOstats


SEOstats is a powerful open source library that provides various SEO related metrics such as detailed backlink analysis, page authority, website trends, keyword, traffic stats, Alexa rank and much more. It gathers data from Alexa, Google, Moz, open site explorer, SEMRush, Facebook and Twitter.

5. PHP Parser

PHP parser

PHP parser 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 to easily analyze the code issues and errors. Moreover, you can turn a syntax tree back into PHP code. The example is shown in the image where the white portion represents simple code and black portion contains generated syntax tree.

  1. PHP Error

PHP Error

PHP Error library is used to transform default error messages into better ones with full syntax highlighting and code snippet. It fixes some error messages that are just plain wrong and works for AJAX too. Moreover, you can manually turn it off or on, run a specific section without error reporting and ignore selected files.



PHP-CPP is a C++ library which can be used to develop PHP extensions. It is packed with easy to use and well documented classes for building native extensions in PHP. This can speed up your program because code written in C++ executes faster than PHP.

2. Eden


Eden is a set of reusable components that works with almost all PHP framework and CMS. It covers components for autoloading, caching, file systems, web services, templating, i18n, payment gateway, shipping and cloud technologies. It works with all major web services including Google, Facebook, Yahoo, PayPal, Tumblr, foursquare and Amazon web services.

1. Locust


Locust is easy to use, user load testing tool. It can be used for figuring out how many concurrent users a system can handle. It allows you to write user test scenarios in Python. Locust has a great interface (HTML+JS) that displays relevant text details in real time.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s