Installing multiple PHP versions on macOS

Most of us works on multiple projects of sub-products in the same time, so in this article I will cover how to install multiple PHP versions and how to switch between them. For PHP developers they may be using frameworks that require using a specific version of PHP, frameworks like Laravel have this issue as they do not focus on backward compatibility with old PHP versions, this can be a good practice to force you update your code.