PHP Library provides a standard library interface which allows developers to take full advantage of Object Oriented Programming in PHP. This library of interfaces creates a standard API for certain kinds of built-in functionality, allowing your classes to interact with the PHP engine in a much more seamless manner. The functionality it provides includes, (for example) is the ability to define how your objects will react when iterated over for each, advanced array access, file and directory access, and advanced SimpleXML object handling.
Therefor to simplify your development process I have collected Useful PHP Libraries and Classes, that would help you with your development related tasks, and help you to achieve desired results within given deadline. Enjoy !!
Dont forget to see our other article on Best PHP Libraries for Developers
1. Requests
Requests is a stable PHP library that uses cURL or fsockopen (depending on the availability) and provides a consistent API. It simplifies sending requests, accepts HEAD, GET, POST, PUT, DELETE or PATCH and adding headers, form data + multipart files. The library also works with international domain names, authentication, auto-decompressing gzipped responses and much more. To sum up, Requests is a must-bookmark for easy-to-use and hosting-friendly HTTP requests.
2. Munee
Munee is an all-in-one library that handles many things related to optimization and manipulation of website assets. The library has a powerful caching feature that can cache resources in both server and client-side. It integrates well with the PHP image manipulation library: Imagine for resizing or cropping images (and caching them afterwards). Munee can automatically compile LESS, SCSS and CoffeeScript. And, it cancombine CSS + JS files into a single request. Also, these CSS-JS files can be minified for a better performance. This PHP library integrates to any code easily with less effort and it can be used with or without .htaccess (good for Windows users).
3. Ratchet
Ratchet is a PHP library to let developers create real-time, bi-directional apps between clients and servers over WebSockets. It makes building event-driven apps (rather than traditional HTTP request/response apps) quick and easy.
4. SwiftMailer
Swift Mailer is a feature-rich PHP mailer library for sending e-mails from PHP websites and applications. It does not rely on PHP’s native mail() class which consumes high resources. Instead, Swift communicates directly with an SMTP server or a MTA binary to send mail quickly and efficiently. Swift supports event-driven plugins which offer you the opportunity to really take control of the library and set this mailer apart from everything else that’s out there.
5. Unirest
Unirest is a pack of lightweight HTTP libraries for many languages (PHP, Ruby, Python, Java And Objective-C). It has support for GET, POST, PUT, UPDATE, DELETE operations and its methods + response structure are the same in all languages. The usage is very simple and straightforward. Also, it is documented well.
6. Detector
Detector is an open source PHP library for detecting many things about the browsing environment of a user. It can get the browser used and browser’s HTML5-CSS3 capabilities, analyze whether it is mobile, tablet, desktop or a spider and other stuff like color depth, viewport dimensions, cookie support, etc. The library can automatically adapt itself to new browsers, versions and devices using the unique user-agent string of each browser. Simply, no need to update a browsers database.
7. PHP Thumb
phpThumb is a PHP library that handles all the hard work on creating thumbnails with only few lines of code. It accepts any source types for images (from the filesystem, URL or database) and all popular image formats. Images can be rotated, cropped, watermarked, their quality can be defined and there is even a built-in caching to minimize the server load. phpThumb also has a wide collection of filters including contrast, blur, brightness, applying rounded corners and more.
8. Zebra Image
Zebra_Image is an open source and lightweight image manipulation library built with PHP. The library is object-oriented, requires only the PHP GD2 extension and supports resize, crop, rotate and flip operations.
It works with .JPG, .GIF + .PNG formats and can convert one format to another after each action (transparency is preserved as well).
9. Hybrid Auth
HybridAuth is an open source PHP library for authenticating through multiple social services and ID providers. The services supported include OpenID,Facebook, LinkedIn, Google,Twitter, Windows Live, Foursquare, Vimeo, Yahoo, PayPal and more. It can be integrated easily into existing websites by inserting a file and few lines to the sign-in/up pages.
10. Gantt Charts
Gantti is an open source PHP class for generating Gantt charts on-the-fly. The charts created are pure HTML5-CSS3 with no JavaScript involved. The output looks very nice by default but can be customized with ease (with SASS stylesheet). It simply works by defining an array of start/end dates and calling a single function. Also, charts are cross browser (IE7+).
11. Mobile_Detect
Mobile_Detect is an open source PHP class for detecting mobile devices. It uses the User-Agent string combined with various HTTP headers in order to detect the mobile environment. The class can easily understand whether the platform is mobile, tablet or desktop. Also, functions exist for detecting whether it is iPad, iPhone, Android, Blackberry, etc. And, we can even drill-down to the versions of the platforms and browsers if needed. It has a huge library of devices (including Nook, Nexus, Kindle, Archos..) and browsers for a stable detection.
12. Imageworkshop
ImageWorkshop is an open source and free PHP class for managing and manipulating images. The class has an “image-editing-software-like logic” based on layers which enables superposing many layers or even layer groups (with the option of each layer being manipulated differently). It has support for many functions like placing an image (or many images) on another one (good for watermarks), cropping, moving, resizing, rotating (with any degrees), superposing, writing and more. ImageWorkshop works with the GD library, and also, allows us to apply filters provided with the library.
13. JqmPhp
jqmPhp is an open source project that aims to simplify using jQuery Mobile with PHP. It is a pack of PHP classes that can generate the HTML outputs which jQuery Mobile is expecting within few lines. The classes are on separate files (with names parallel to the JQM’s features) so you can choose to only use the necessary ones. It covers almost all the features of the framework, it is very well-documented and supported with examples.
14. PHP Image Cache
Image Cache is a lightweight PHP class that compresses, moves, and caches the image in the user’s browser. After that, it returns the new source of the image to be printed in an image tag which results in a serious gain on load time. The class works by simply setting options like the directory, the base URL, etc. and calling a compress function for each image.
15. Imagine
Imagine is an object-oriented PHP library for working with images and manipulating them. The library can handle frequently-used operations like resize, crop or applying filters. A color class helps generating the RGB values of any given color and methods exist for drawing shapes like arc, ellipse, line, pieSlice and more.