PHP Classes

Either package blog

Recommend this page to a friend!

Latest Either package blog posts

  All package blogs All package blogs   Either Either   Blog Either package blog   Post article Post article  

1. How Can a PHP Functional Programming Library Be Used to Process Sequences of Actions in a Simpler Way

Updated on: 2021-04-23

Posted on:

Often PHP developers need to write code that processes sequences of actions that may be executed or not depending on the success of prior actions.

Using the traditional if and else code structures may become confusing when there is a long sequence of actions that can be executed conditionally.

Read this article to learn how to use a functional programming approach with the Either package to avoid using the if and else statements to make the code less confusing.

Exception handling as a form of code micromanagement

We introduce a structure called Either. It's used on the functional world with programming languages like Haskell ad Scala. After I started using it, I appreciate the way it turns my PHP code more clear.


Blog More ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)


  All package blogs All package blogs   Either Either   Blog Either package blog   Post article Post article