Tags
Language
Tags
April 2024
Su Mo Tu We Th Fr Sa
31 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 1 2 3 4

Functional PHP

Posted By: readerXXI
Functional PHP

Functional PHP
by Gilles Crettenand
English | 2017 | ISBN: 1785880322 | 335 Pages | True PDF | 1.72 MB

A functional approach encourages code reuse, greatly simplifies testing, and results in code that is concise and easy to understand. This book will demonstrate how PHP can also be used as a functional language, letting you learn about various function techniques to write maintainable and readable code.

After a quick introduction to functional programming, we will dive right in with code examples so you can get the most of what you've just learned. We will go further with monads, memoization, and property-based testing. You will learn how to make use of modularity of function while writing functional PHP code.

Through the tips and best practices in this book, you'll be able to do more with less code and reduce bugs in your applications. Not only will you be able to boost your performance, but you will also find out how to eliminate common loop problems. By the end of the book, you will know a wide variety of new techniques that you can use on any new or legacy codebase.

What you will learn:

Declare functions/callables and find out how to manipulate and call them
Write pure functions to get more robust code that can be easily tested
Learn to compose function using various techniques
Use a functional approach to find readable solutions to common issues
Utilize performance optimization techniques such as laziness, memorization, and parallelization
Build the business logic of applications with the functional paradigm
Test functional code and know how to speed up test runs using parallel testing
Understand the impact and limitation of functional programming in PHP