Is there a PHP syntax checker plugin for Notepad++?
Please don't answer "Use another editor instead"
In Notepad, add . php to the end of the filename and enclose in double quotations. This ensures the file will not be converted into a basic text file by Notepad.
Check PHP Version by Running PHP Codephp echo 'PHP version: ' . phpversion(); Create the file using a text editor like gedit or Notepad, and upload it to your website's document root directory.
PHP programs can be written on any editor, such as - Notepad, Notepad++, Dreamweaver, etc. These programs save with . php extension, i.e., filename. php inside the htdocs folder.
Try NppExec plugin for Notepad++. Using it create a command to be something like this:
cmd.exe /K c:\your\path\to\php.exe -l "YOUR_FULL_FILE_NAME"
Instead of YOUR_FULL_FILE_NAME you should use appropriate Notepadd++ macro -- I think it is $(FULL_CURRENT_PATH)
but double check with NppExec manual (installs together with plugin).
P.S. But any IDE will be better for sure (I'm using PhpStorm). If IDE is too heavy for your PC then look for php-oriented editors, like Blumentals RapidPHP etc (it's lighter than full IDE but may have all really important features).
As LazyOne said above, you can use NppExec which you can install using the plugin manager (Plugins>Plugin Manager>Show Plugin Manager
) You'll also need to have PHP installed. Lastly, the command I use to do PHP syntax checking with NppExec is
"C:\Program Files (x86)\PHP\php.exe" -l $(FULL_CURRENT_PATH)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With