-
Editor application: You can use the editor application to open the PHP file and view/edit its code, such as Sublime Text, Atom, Visual Studio Code, etc. These applications support syntax highlighting, automatic code completion and other functions to facilitate you to write and debug PHP code. -
Web server application: If you want to run PHP code locally and view the effect in the browser, you can install the Web server application (such as Apache, Nginx, or MAMP), and then place the PHP file in the document root directory of the Web server (by default, on Mac /Library/WebServer/Documents perhaps ~/Sites Table of Contents). In this way, you can access the file through a browser and run PHP code. -
Comprehensive development environment: Some applications can be used as comprehensive development environment, including editor, Web server, debugger and other functions. These applications can better support PHP development, such as PhpStorm, NetBeans, and so on.