PHP syntax check on Save
Posted on December 7, 2006 on 10:29 am by glen | In PHP, Mac |John Gruber has produced a nice little AppleScript to check your PHP documents for syntax errors. I have found that you can use this as a nice safety net so not to save any PHP documents with errors by attaching the script to the Save option in the File menu:
1. Install the AppleScript into ~/Library/Application Support/BBEdit/Scripts/
2. Make an Alias to this script and name it Fileā¢Save You can get the round character between File and Save by holding the option key and pressing 8.
3. Move this Alias to ~/Library/Application Support/BBEdit/Menu Scripts/
4. Restart BBEdit
Now, whenever you try and save a PHP script, it will perform a syntax check. If there are any problems, then it will tell you what line number the problem has occurred on, which you can then fix. Useful, yes?
No Comments yet »
RSS feed for comments on this post. TrackBack URI