𝌔 Fossil Hub
Login | Fossil manual |
phptags tag tidier

Artifact [41254d8f0a]

Artifact 41254d8f0ad30c4fbcbce88ae24f6b75e90f4772:

Wiki page [phptags tag tidier] by mario 2014-11-08 00:33:06.
D 2014-11-08T00:33:06.593
L phptags\stag\stidier
N text/x-markdown
P b4faadc55f867ff2878d24405ca711bf4584cdac
U mario
W 1781
<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 token variations.
  *  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
  *  <mark>[http://include-once.org/p/phptags/](http://include-once.org/p/phptags/#~download)</mark> ← 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>

  *  `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 &lt;?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 <b>--help</b> or the [manpage](wiki/manpage) [^](http://fossil.include-once.org/phptags/finfo?name=manpage.1) for the complete reference.

Z bad31bf98cdb8264d34b8390890b98f3