As macOS is built on a Unix framework, you can use this entirely to run your local host, and its just a case of editing some files on your mac and changing them. There is some great documentation on this at (http://php.net/manual/en/install.macosx.bundled.php).