From: Jakub Vrana Date: Wed, 12 Mar 2025 22:32:34 +0000 (+0100) Subject: Compile: Add more php_shrink tests X-Git-Tag: v5.0.5~34 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=b9b4db0c8edb6ec02f7fba51e65ff114a7951f79;p=adminer.git Compile: Add more php_shrink tests --- diff --git a/php_shrink.inc.php b/php_shrink.inc.php index f13c2f95..f127493d 100644 --- a/php_shrink.inc.php +++ b/php_shrink.inc.php @@ -1,7 +1,18 @@ HTMLab; }}', 'class C{var$ab;function f($b){return$b.$this->ab;}}'); +check('namespace NS { class C { public $ab = 1; } } new NS\C; $ab = 2;', 'namespace NS{class C{var$ab=1;}}new NS\C;$a=2;'); check('new \stdClass;', 'new \stdClass;'); +check('if (true) { echo "a"; } else { echo "b"; }', 'if(true)echo"a";else echo"b";'); +check('echo $_GET["a"];', 'echo$_GET["a"];'); +check('$ab = 1; echo "$ab";', '$a=1;echo"$a";'); +check('echo 1; echo 3;', 'echo 1,3;'); +check('echo 1; ?>2