Compile: Move ?><? removal to php_shrink

This commit is contained in:
Jakub Vrana
2025-03-13 17:33:42 +01:00
parent 9afbf1a465
commit 4c2a8b0050
3 changed files with 2 additions and 1 deletions

View File

@@ -13,6 +13,7 @@
*/
function php_shrink($input) {
// based on http://latrine.dgx.cz/jak-zredukovat-php-skripty
$input = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $input);
$special_variables = array_flip(array('$this', '$GLOBALS', '$_GET', '$_POST', '$_FILES', '$_COOKIE', '$_SESSION', '$_SERVER', '$http_response_header', '$php_errormsg'));
$short_variables = array();
$shortening = true;