Theoreotically the same procedure to what Kier demonstrated, except:
1. macPorts requires sudo access to operate.
2. macPorts won't get interfered by cross-national firewalls since it has multiple mirrors around the world. Homebrew usability depends on whether you can use GitHub without a problem.
3. Unless you deliberately compile-install macPorts to /usr/local/ (some people do this to ensure compatibility with existing shell scripts written for Homebrew), you are supposed to change /usr/local/ to /opt/local/ folder.
4. in macPorts, phps are not phps but consists of separated commands: php56, php70, php71, php72, php73, php74, php80, etc.
5. to load PHP (if macPorts php installer doesn't automatically help you configure this), add this module LoadModule php_module lib/apache2/modules/mod_php80.so
to your httpd.conf or your site definition file referred by httpd.conf file.