1. Add PHP to the system environment variables:
The effect of adding environment variables is as follows:
2: Set up Sublime
Select: Tools -> Build System -> New Build System....
Add the following configuration:
{ <br /> "cmd": ["php", "$file"], <br /> "file_regex": "php$", <br /> "selector": "source.php" <br />}
ctrl + s save named: PHP.sublime-build
3. Run
ctrl + b run
Isn’t the method very simple, but very practical? I will update some configuration methods for running php in other software later.