Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Artifact ID: | ee797ee333afa8d7f885b2747e4beebfca192ba2 |
---|---|
Page Name: | phptags tag tidier |
Date: | 2014-11-08 00:33:35 |
Original User: | mario |
Mimetype: | text/x-markdown |
Parent: | 41254d8f0ad30c4fbcbce88ae24f6b75e90f4772 (diff) |
Next | e780893d32920edf96afcbd3908e13b51230d1d7 |
Content
phptags
phptags is a simple command-line tool to automate the alteration of open and close tags in PHP scripts.
- It can convert between short <mark>
<?
</mark> and long <mark><?php
</mark> open token variations. - Add missing <mark>
?>
</mark> close tokens. - Excise
<mark>close tags.?>
</mark> - Correct leading or trailing <mark>
␣
</mark> whitespace / UTF-8 BOM issues around them.
It utilizes either regex and/or the tokenizer.
project pages
- http://freshcode.club/projects/phptags ← update announcements
- <mark>http://include-once.org/p/phptags/</mark> ← download
- http://fossil.include-once.org/phptags ← repository
- http://apt.include-once.org/ ← APT archive
usage examples
phptags --whitespace *.php
cleans up spaces or UTF-8 BOM issues before opening and after close tagsphptags --warn directory/
searches through a directory and just warns about whitespace issuesphptags --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 manpagemisref(http://fossil.include-once.org/phptags/finfo?name=manpage.1) for the complete reference.
- ^ Misreference