O'Reilly logo

Functional PHP by Gilles Crettenand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Libraries

Now that we covered the basics of the functional techniques with the various functions already available in PHP, it's time to have a look at the various libraries that will allow us to concentrate on our business code, instead of writing helpers and utility functions, as we did with our new Maybe and Either types.

The functional-php library

The functional-php library is probably one of the oldest libraries related to functional programming for PHP, as its first release dates back to June 2011. It evolved nicely with the newest PHP version and even switched to Composer last year for distribution.

The code is available on GitHub at https://github.com/lstrojny/functional-php. It should be fairly easy to install if you are accustomed to using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required