Quicklook and syntax highlighting
You can add syntax highlighting to macOS QuickLook and get nice previews of JSON and PHP-files.
To install the Quicklook plugin for for code highlighting. Make sure you have Homebrew installed:
brew cask install qlcolorcode
JSON-formatting and highlighting
brew cask install quicklook-json