𝌔 Fossil Hub
Login | Fossil manual |
phptags tag tidier

Artifact [0c81043035]

Artifact 0c810430352513954fd6b441cc359a75a2fc4365:

Wiki page [phptags tag tidier] by mario 2014-11-07 18:53:45.
D 2014-11-07T18:53:45.575
L phptags\stag\stidier
P 7239d00391f8caf86bcbb8d6f47fd81df535ada8
U mario
W 1422
<h2>phptags</h2>

phptags is a simple command-line tool to automate the rewriting of PHP open and close tags.

  *  It can convert between short `<?` and long `<?php` open token.
  *  Add missing `?>` close tags.
  *  Excise <s>`?>`</s> close tags.
  *  Correct leading or trailing `␣` whitespace / UTF-8 BOM issues.

It utilizes either regex and/or the tokenizer.

<h3>project pages</h3>

  *  [http://freshcode.club/projects/phptags] (updates)
  *  [http://include-once.org/p/phptags/] (download)
  *  [http://fossil.include-once.org/phptags] (repository)
  *  [http://apt.include-once.org/] (packages)

<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 09e7c5a691f17dbd0951d599c7ec7c64