Dec 9, 2008
UPDATE: I submitted this as a bug report for Eclipse PDT, and it's now part of the latest release!
Like many PHP developers who use Eclipse PDT, your first step after creating a new PHP file is probably to remove the closing
?> tag that Eclipse puts in it for you. Today I did those same three keystrokes (or more if you don't use keyboard shortcuts) to remove the damn closing PHP tag (whose absence is part of many coding standards), and decided to never do it again manually. The solution is quite simple:
- Open the eclipse preferences through the menu (exact location varies between operating systems).
PHP >> Templatesin the navigation on the left.
- On the right, select the
New Simple PHP filetemplate and click
- Change the pattern from
Okagain, and you're done!