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

Content


BackPress

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.

phpSEO

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


PHPExcel

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.

PHPPowerpoint

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

TCPDF

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.

FPDF

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

ZipStream

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


EasyUp

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

class.upload.php

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.

WideImage

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.

Asido

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

xColor

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.

 

E-mail


PHPMailer

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).

 

Forms


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.

VDaemon

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


Crystal

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.)

ADOdb

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.

Doctrine

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.

ezSQL

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.

NYT_Transformer

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).

 

Charts


pChart

A PHP charts class for displaying the data beautifully.

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

JpGraph

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.

 

Feeds


SimplePie

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.

phpFlickr

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.

PHPWeatherLib

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.

 

Others


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.

PHP DNS Query

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).

XMPPHP

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

  • http://www.webrisorsa.info Web Risorsa

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

  • http://www.kumaradesign.com Juhani

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

  • Hervé

    Doctrine is missing :
    http://www.doctrine-project.org/

  • http://www.twitter.com/ditatompel ditatompel

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

  • http://www.webresourcesdepot.com Umut M.

    Guys,

    Great to hear you liked it.

    @Hervé,

    Definitely. Just added it.

  • Petr Kratina

    Hello,
    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:

    http://dibiphp.com/

  • rajaishbt

    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.

  • http://www.phpclonescript.com/ James

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

  • Jerry

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

    http://asido.info

  • http://www.dangermoose.co.uk flashmac

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

  • http://www.matthewfedak.co.uk Matthew Fedak

    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.

  • Eiskalter Engel

    Don’t forget JpGraph :)

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

  • http://www.webresourcesdepot.com Umut M.

    @Petr,
    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.

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

    @Everyone,
    Great to see you like the post.

  • http://www.alltechdealsonline.com All Tech

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

  • Ege Özcan

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

  • http://www.tutorialfeed.org TutorialFeed

    Its really a wonderful post. Thanks for sharing.

  • Stawl

    Amazing post :) Good work

  • http://www.thomascraigconsulting.com Thomas Craig Consulting

    Awesome collection, just what I was looking for.

  • paulrajj

    Fabulous collection ! gr8 work…

  • http://www.desi-date.com/ DD

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

  • http://dandumitrache.com Dan Dumitrache

    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.

  • http://www.mascarillasfaciales.net/ antiarrugas

    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.

Search