𝌔 Fossil Hub
Login | Fossil manual |
phptags tag tidier

Artifact [8ca5b1e410]

Artifact 8ca5b1e41025e0b0497e100aab08c0f4b922d558:

Wiki page [phptags tag tidier] by mario 2014-11-07 19:02:55.
D 2014-11-07T19:02:55.040
L phptags\stag\stidier
N text/x-markdown
P d3f576cb3a2f99e1fefa920b97c4ff65761b2985
U mario
W 1767
<h2>phptags</h2>

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 tokens.
  *  Add missing <ins><mark>`?>`</mark></ins> close tokens.
  *  Excise <s><mark>`?>`</mark></s> close tags.
  *  Correct leading or trailing <mark>`␣`</mark> whitespace / UTF-8 BOM issues around them.

It utilizes either regex and/or the tokenizer.

<h3>project pages</h3>

  *  [http://<em>freshcode.club</em>/projects/phptags](http://freshcode.club/projects/phptags#~releases) ← update announcements
  *  [http://include-once.org/p/phptags/](http://include-once.org/p/phptags/#~download) **← download**
  *  [http://<em>fossil</em>.include-once.org/phptags](http://fossil.include-once.org/phptags#~repository) ← repository
  *  [http://<em>apt</em>.include-once.org/](http://apt.include-once.org/#~phptags) ← APT archive

<h3>usage examples</h3>

  *  <b>phptags --whitespace *.php</b> cleans up spaces or UTF-8 BOM issues before opening and after close tags
  *  <b>phptags --warn directory/</b> searches through a directory and just warns about whitespace issues
  *  <b>phptags --close --long --tokenizer  *.php</b> adds close tags, converts open tags into long form &lt;?php and uses the more reliable --tokenizer mode (instead of --regex)
  *  <b>phptags --unclosed --shortall  dir/ ../*.tpl includes/</b> 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 <b>--help</b> or the [manpage] [http://fossil.include-once.org/phptags/finfo?name=manpage.1|^] for the complete reference.

Z 41f0a4dfb3c329a0e37fdc9c2dfb10a2