Functional Programming in PHP
Author | : Simon Holywell |
Publisher | : PHP[Architect] |
Total Pages | : 118 |
Release | : 2014-04-01 |
ISBN-10 | : 1940111056 |
ISBN-13 | : 9781940111056 |
Rating | : 4/5 (056 Downloads) |
Download or read book Functional Programming in PHP written by Simon Holywell and published by PHP[Architect]. This book was released on 2014-04-01 with total page 118 pages. Available in PDF, EPUB and Kindle. Book excerpt: Many programming languages have embraced Functional Programming paradigms to augment the tools available. It also facilitates writing code that is easier to understand, easier to test, and able to take advantage of parallelization. PHP introduced anonymous function and closures in 5.3, providing a more succinct way to tackle common problems. However, making the leap from the more common imperative style requires understanding how and when to best use lambdas, closures, recursion, and more. Functional Programming will show you how to leverage these new language features by understanding functional programming principles. Plenty of examples are provided to illustrate each concept as it's introduced and to show how to implement it with PHP. You'll learn how to use map/reduce, currying, composition, and more. You'll see what external libraries are available and new language features are proposed to extend PHP's functional programming capabilities.