10 awesome PHP libraries you should know about (Part 2)

Ngoc Huynh

6. Carbon


Carbon is a simple API extension for the DateTime. It enhances the class with some useful methods for working with dates and time. For example:

7. Ubench


Ubench is a micro library for benchmarking your PHP code. It monitors execution time and memory usage. It would be a good idea to run these checks only while developing. Here’s an example:

8. Faker


Faker is a PHP library that generates fake data for you. It can come handy when you need to populate a test database or generate sample data for your web application. It is also very easy to use:

As long as you keep accessing properties of the object, it will continue returning randomly generated data.

9. Omnipay


Omnipay is a payment processing library for PHP. It has a clear and consistent API and supports dozens of gateways. With this library, you only need to learn one API and work with a variety of payment processors. Using the same consistent API makes it easy to support multiple payment processors or to switch as the need arises.

10. PHPGeo


PHPGeo is a simple library for calculating distances between geographic coordinates with high precision. This will work great in apps that make use of location data. To obtain the coordinates, you can use the HTML5 Location API, Yahoo’s API.

Share the news now