From cbdf09d8687b6a1f15c84df9746b01852f266826 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 12 May 2011 16:21:40 +0200 Subject: [PATCH] Show version in comment (thanks to David Grudl) --- compile.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compile.php b/compile.php index a8b0384b..17a2e9b6 100644 --- a/compile.php +++ b/compile.php @@ -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; @@ -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;