The*_*Kid 2 php compression minify
我们都知道xHTML/CSS和JS缩小和压缩有利于大型流量站点.
看看下面的代码:
include("template.funcs.php");
include("country-redirect.php");
if(($country=='PL')||($country=='POL'))
{
header('Location: index_pol.php');
exit();
}
$include_path = './global_php/';
$page = "couture";
include $include_path."shop.inc.php";
$movie_num = 1 ;
Run Code Online (Sandbox Code Playgroud)
现在看看minifed版本:
include("template.funcs.php");include("country-redirect.php");
if(($country=='PL')||($country=='POL')){header('Location: index_pol.php');
exit();}
$include_path='./global_php/';$page="couture";include $include_path."shop.inc.php";
$movie_num=1;
Run Code Online (Sandbox Code Playgroud)
您认为哪一个更快 - 一般来说,我也想开始缩小我的编程,小的var和字符串名称,如$ a而不是$ apple,并试图删除尽可能多的额外字符.PHP编译器会像压缩块还是间隔一块?
Pek*_*ica 10
PHP编译器会像压缩块还是间隔一块?
不要紧.它们之间的任何差异最多都是微秒.
使代码可读是唯一重要的事情.