When using sublime text 2 to write a PHP program, when you save the code, directly check out the syntax error, is conducive to improve efficiency.
1. Installing the Sublime Text 2 package
Menu:preferences->package Control-and install package
Installing the PHP Syntax Checker plugin
Sublime 2 installation directory:
C:\Program Files (x86) \sublime Text 2
Package and Configuration Storage directory:
C:\Users\xzz64\AppData\Roaming\Sublime Text 2\packages
2. Make sure that your system has a PHP program installed and is available globally.
3.windows PHP commands are available globally
Because my computer is installed XAMPP contains Php.exe, but the Windows command line is not available with the PHP command
PHP is available by adding environment variables
3.1 PC Right-click Properties Advanced System settings Edit environment variable PATH, pay attention to the addition of the use; split do not change the other added
Environment variables to prevent other variables
Reference: https://jingyan.baidu.com/article/b24f6c82cba6dc86bfe5da9f.html
4. Restart Sublime Text 2
When editing the PHP file save, if the PHP file has syntax errors will prompt, prompt before and after a check on the line can be.
Sublime Text 2 PHP syntax error checking