40+ Must-Bookmark PHP Classes & Libraries For Developing Faster

PHP IconPHP, being the most popular scripting language, has lots of documentation, tutorials and resources about itself.

And, as a feature-rich language, it is possible to accomplish many tasks by default from handling e-mails to images, PDFs to database connections, etc.

However, there are high-quality and free PHP classes and libraries which helps you get more like:

  • good looking charts
  • form validation
  • parsing feeds
  • better image or database handling
  • and more.

Here is a collection 40+ totally free PHP classes and libraries that every PHP developer would love to bookmark:

Free PHP Classes And Libraries



A complete library, that grew from WordPress, which offers the most common tasks for creating web applications like user management, HTTP transactions, logging, formatting and more.

PHP User Class

The class aims to ease the handling of user management tasks like registration, login, logout, etc. for PHP-MySQL applications.


Do you want to automate the process of generating keywords or meta tags from the content? This is what  phpSEO does.

It can create any desired number of keywords from a given string or URL, generate a description and does all with not using any banned words you define.

PHP Typography

A PHP class for improving web typography with features like hyphenation, spacing control, wrapping of long text, character replacement for items like ordinal suffixes, trademark or math symbols and more.

Tag Cloud

The class creates tag clouds from a given array of items where each tag can have its own color, URL and style.


Handling Documents


A set of PHP classes for writing to and reading from different file formats, like Excel, PDF and HTML.

It supports many MS Excel features like adding worksheets to a spreadsheet, inserting data and formulas to cells, calculating formulas and much more.


Set of classes for reading and writing to Powerpoint documents and supports adding slides, rotating images and more.


A complete PHP PDF class with features like custom page formats or margins, support for images and automatic page header/footer management.

It can also handle document encryption, PDF annotations, bookmarks and table of content.


A PDF generator class with flexible page format and margins support. It can automatically arrange page breaks and can insert images into documents.


Compared to many PHP zipping libraries, this class does not require  "writable temp directory" and can generate + start the download after the client timeouts (good for huge files).


File Uploads, Images & Colors


A clean and simple PHP file upload class which can also delete the file uploaded and get the size + filename of it


A PHP class for manipulating and uploading image files on-the-fly.

It can convert, resize and work on uploaded images in many ways: add labels, watermarks and reflections.

Image Resizing Made Easy with PHP

A PHP class which can open, resize (smart resizing with no distortion) and save a number of images in multiple formats.

It is explained very well with a detailed tutorial.


A feature-rich PHP library for image manipulations by providing a simple way to loading and saving images from/to files, strings, database, uploads and URL addresses.

You can apply filters, get channels, merge, resize, crop or rotate images using the library.


A powerful PHP image processor with features like resize, rotate, watermak, frame, convert, rotate, crop and much more.


An impressive class to make various calculations on colors like converting between formats (HEX,RGB,HSL/HSV), getting the end color when a color is added to or removed from a pallette and more.




One of the most popular PHP e-mail classes around with features like multiple receivers, embedded images, HTML or plain text,  SMTP authentication and much more.

There are also other projects by the same author for form-to-emails, mailing list and bounce management.

Swift Mailer

The library can send emails using SMTP, sendmail, postfix or a custom method.

It supports SMTP authentication, handling attachments and much more. A great thing is, it is extendable with plugins (there are already ones for antiflood, throttling and logging).



PHP Validation

A set of rules for instantly adding server-side validation to our forms.

The rules include "required, length, e-mail, date, numeric, string and much more. Also, you can add custom regular expressions.


It can check user input by comparing to the rules defined and, if necessary, display errors.

The library has methods like required, e-mail, zip codes, IP address, date, time, integer, string and much more.

Securimage (Captcha)

This PHP captcha class can create complex images or captcha codes and can be easily added into existing forms.

The codes generated can be in custom length, font and use backgrounds. Also, a Flash button can play the mp3 of the image.


Database & Backup


This PHP database wrapper offers a human-readable SQL and makes CRUD operations so easy.

It also handles data validation and database manipulation (creating databases, tables, etc.)


A database abstraction library for PHP which supports almost any database (MySQL, PostgreSQL, Interbase, Firebird, Informix, Oracle, MSSQL, Access, SQLite, etc.).

It is fast, supports advanced features like SQL code generation, database-backed sessions and more.


It offers a powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction.

Also an object relational mapper (ORM) that sits on top of a powerful database abstraction layer (DBAL) which can write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL) providing developers a powerful alternative to SQL that maintains flexibility without requiring unnecessary code duplication.


This PHP database class makes using popular databases a breeze.ezSQL with detailed debug functions to find outwhat’s going on in your SQL code.


A free PHP class that is developed by the NY Times development team.

It can convert various input types to many other types like Oracle to MySQL or from a database to a flat file.

PHPMYExport (Database Backup)

The class enables users to backup and restore databases (MySQL, PostgreSQL, MSSQL, etc.) from a web-based interface.

BigDump (Staggered MYSQL Database Importer)

Taking backups of large MySQL databases via scripting (like from phpMyAdmin) is usually an issue as backups may not be completed because of the PHP timeout value.

This class backups databases with small portions every time and continues from where it had stopped.

Database CSV Class

It extracts data from a database and generates a .CSV file with it.

The class can be set to prompt you to download the generated file or save it in a folder (or both).




A PHP charts class for displaying the data beautifully.

It supports line- bar and pie charts in both 2D and 3D.


An impressive graphing library with support for lots of chart types. It generates web-friendly, small images, can draw 200+ flags with a built-in function and has an internal caching.

Sparkline PHP Graphing Library

Sometimes charts are not what we need and displaying the data within a paragraph, just like a word, works better.

This library exactly does that. Using it, you can create tiny graphics to present your data.




It is the ultimate PHP class for fetching, caching, parsing feeds with lots of integrated methods from social bookmarking integration to one-click subscriptions for popular feed services.

Last RSS

A simple yet powerful RSS parser with features like caching, limiting items and date formatting.

Magpie RSS

A modular and bandwidth-friendly (transparent GZIP-encoding) RSS parser with an integrated caching system.


3rd Party Services

Short URL Class

There are many sort URL services and it is possible that you may not want to stick to only one.

This class can shorten URLs with TinyURL, Is.gd, Hex.io, Tr.im & Bit.ly API.

Google Translation PHP wrapper

Google Translate has a limit of translating 5000 words at once. This smart PHP class can translate unlimited numbe of words by splitting the input, sending the queries one-by-one and merging the results at the end.

GAPI – Google Analytics PHP Interface

An easy to use PHP class for getting Google Analytics data.

To view a working demo, check out the tutorial I had published using the class: FeedCount-Like Google Analytics Counter.

PHP Payment Library for Paypal, Authorize.net and 2Checkout (2CO)

If you want to use these providers at the same time in a project, the library offers an API which enables you to handle all providers in the same way.


It is a PHP wrapper for the Flickr API which returns a friendly array of data to make development easier.

The class has support for uploading photos, getting albums + images inside them and caching.

Twitter with OAuth class

It makes communicating with the Twitter API (using OAuth) easier and supports almost every feature of the API.


A lightweight weather conditions library that pulls the weather data from the NOAA's public XML weather feeds.

It can get the temperature (in multiple formats), wind, humidity and an icon for the weather situation.



HTML Purifier

A complete PHP HTML filter library that can remove malicious code (with a whitelist) and also makes sure the documents are standards-compliant.


A set of PHP classes that provides a direct domain name service API.

It offers direct to-server queries, the ability to process the response in detail but still with a simple interface for the developer.

hKit (Microformats Parser)

A simple class for extracting common microformats from a page (currently supports hCard).


It enables you to connect to any XMPP 1.0 server (like Google Talk), send messages and supports SSL/TLS connections.

  1. Reply Web Risorsa July 14, 2010 at 3:17 AM

    Great effort made. I am impressed with the way you have given the post. Thanks for the post.

  2. Reply Juhani July 14, 2010 at 3:22 AM

    Awesome post! I was just about to start googlin’ for a comprehensive PHP emailer class. Thumbs up for making my life easier 😉

  3. Reply Hervé July 14, 2010 at 4:00 AM

    Doctrine is missing :

  4. Reply ditatompel July 14, 2010 at 4:02 AM

    Tweet thisTweet = new Tweet();
    me.shout(“Great collection! Thank you for sharing”);

  5. Reply Umut M. July 14, 2010 at 4:07 AM


    Great to hear you liked it.


    Definitely. Just added it.

  6. Reply Petr Kratina July 14, 2010 at 4:40 AM

    great list, but I am missing dibi – one file database abstraction layer. Take a look, simple, easy-to-learn, easy-to-use, stable and powerful:


  7. Reply rajaishbt July 14, 2010 at 4:58 AM

    I accidentally came to WRD a year before. From that day onwards I am watching WRD. You structured and categorized the WRD excellently. This is really a Great work. Thanks for your post.

  8. Reply James July 14, 2010 at 5:53 AM

    Great list. i ll definitely use backpress. i love wordpress classes and functions. Thanks for such a great post.

  9. Reply Jerry July 14, 2010 at 8:05 AM

    About the image libraries — check out Asido, it is really cool, with a lot of features:


  10. Reply flashmac July 14, 2010 at 8:25 AM

    What a beautiful post. These classes will come in handy to just about any serious developer. Simply brilliant.

  11. Reply Matthew Fedak July 14, 2010 at 8:36 AM

    A great list of php classes I think they should be an xml parsing class in there, not just rss parse classes. Theres a lot or REST and SOAP apis I use which dont an offer an rss format.

  12. Reply Eiskalter Engel July 14, 2010 at 8:44 AM

    Don’t forget JpGraph 🙂

    This is a really powerful charting library which is free for use in GPL software: http://jpgraph.net/

  13. Reply Umut M. July 14, 2010 at 9:33 AM

    Dibi look very nice, would love to add but the documentation is not in English (which would result in many users not being able to use it).

    @Jerry & @Eiskalter,

    I had mentioned them before at WRD but within lots of PHP resources, missed them. Added both.

    If I’m not wrong, SimplePie should be parsing standard XML files too.

    Great to see you like the post.

  14. Reply All Tech July 14, 2010 at 10:10 AM

    Great collection! Very useful php tools.
    I want to check them out one by one.
    Thanks for the great post!

  15. Reply Ege Özcan July 15, 2010 at 3:35 AM

    Perfect… Thank you, thank you… =) These will come handy sometime for sure^^

  16. Reply TutorialFeed July 15, 2010 at 4:34 AM

    Its really a wonderful post. Thanks for sharing.

  17. Reply Stawl July 16, 2010 at 9:51 AM

    Amazing post 🙂 Good work

  18. Reply Thomas Craig Consulting July 17, 2010 at 7:26 AM

    Awesome collection, just what I was looking for.

  19. Reply paulrajj August 12, 2010 at 1:40 AM

    Fabulous collection ! gr8 work…

  20. Reply DD August 27, 2012 at 11:28 AM

    All I can say is thanks and that I will try to use these.

  21. Reply Dan Dumitrache September 10, 2012 at 7:16 AM

    I am wondering why PHP is popular. Definitely, the answer is because of the WordPress. I do believe that 5 years later very few of us will remember PHP.

    You have got a huge collection of PHP here. Good article I will say … it is that kind of article that is always bookmarked.

  22. Reply antiarrugas February 14, 2014 at 10:52 AM

    I got this web site from my friend who informed me about this web
    page and now this time I am browsing this site and reading
    very informative posts here.

Leave a reply