Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Artifact ID: | 61d5fb4c84e452504a935fb3aacb9310ba6f0e27 |
---|---|
Page Name: | phptags tag tidier |
Date: | 2012-09-14 01:37:55 |
Original User: | mario |
Parent: | 2200b90e64eeec5ea2636a4f184ebdc3b414a408 (diff) |
Next | de4625df86e08bd3d98b38ff4e562930fbc3fd53 |
Content
phptags
phptags is a simple commandline tool to automate the rewriting of PHP open and close tags.
- It can convert between short and long open tags.
- Add missing close tags.
- Or strip close tags.
- Correct leading or trailing whitespace issues.
It utilizes either regex and/or the tokenizer.
project pages
- http://freecode.com/projects/phptags (updates)
- http://include-once.org/p/phptags/ (homepage)
- http://fossil.include-once.org/phptags (repository)
- http://apt.include-once.org/ (download)
usage examples
- phptags --whitespace *.php cleans up spaces or UTF-8 BOM issues before opening and after close tags
- phptags --warn directory/ searches through a directory and just warns about whitespace issues
- phptags --close --long --tokenizer *.php adds close tags, converts open tags into long form <?php and uses the more reliable --tokenizer mode (instead of --regex)
- phptags --unclosed --shortall dir/ ../*.tpl includes/ converts all tags into short forms, and strips close tags of a document (it's advised to rather have whitespace issues fixed than keep using the newcomer workaround)
See also --help or the manpage ^ for the complete reference.