<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 close tokens.
  *  Excise 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>

  *  ← update announcements
  *  ← download
  *  ← repository
  *  ← 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) for the complete reference.