Navigation Menu

Skip to content

Commit

Permalink
Show version in comment (thanks to David Grudl)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed May 12, 2011
1 parent dd39e3a commit cbdf09d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compile.php
Expand Up @@ -101,6 +101,7 @@ function short_identifier($number, $chars) {

// based on http://latrine.dgx.cz/jak-zredukovat-php-skripty
function php_shrink($input) {
global $VERSION;
$special_variables = array_flip(array('$this', '$GLOBALS', '$_GET', '$_POST', '$_FILES', '$_COOKIE', '$_SESSION', '$_SERVER'));
$short_variables = array();
$shortening = true;
Expand Down Expand Up @@ -138,6 +139,7 @@ function php_shrink($input) {
} else {
if ($token[0] == T_DOC_COMMENT) {
$doc_comment = true;
$token[1] = substr_replace($token[1], "* @version $VERSION\n", -2, 0);
}
if ($token[0] == T_VAR) {
$shortening = false;
Expand Down

0 comments on commit cbdf09d

Please sign in to comment.