After all these years (can't really remember when I first discovered it), I'm still using MacPorts. It's actually become more useful on my aging (obsolete?) MacBook Pro 2012, which is frozen in time running MacOS 10.15 Catalina. I'm now using macports to run both apache2 and php 7.4 on this development machine, and I sometimes forget how much I rely on it, even though it's such a PITA when upgrading the OS. In addition to php itself, I need to use macports to install libraries & dependencies as well. Here are those that I'm currently using. Hopefully this list will help when I (eventually) buy a new machine:
To install any of these, use the following syntax:
$ sudo port install