PHP Minify Tool
Rarraba PHP yana ɗaukar kyakkyawan tsarin JS code ɗin da kuka rubuta kuma yana cire tazara, shigarwa, sabbin layi, da sharhi. Ba a buƙatar waɗannan arie don PHP ya gudana cikin nasara. Hakanan yana sa PHP ya fi wahalar karantawa yayin kallon tushen.
Yawancin masu haɓakawa za su kula da sigar 'kyakkyawan', kuma bayan tura aikin su suna gudanar da rubutun su ta hanyar shirin ragewa. Har ila yau, sukan haɗa fayilolin rubutun su da yawa zuwa fayil guda.
Me yasa ake amfani da Minifier PHP?
Manufar minifcation shine ƙara saurin gidan yanar gizon. Ragewa na iya yin rubutun har zuwa 20% karami, yana haifar da saurin lokacin saukewa. Wasu masu haɓakawa kuma za su yi amfani da shi don 'ɓata' lambar su. Wannan yana sa ya zama da wahala a karanta lambar, don haka yana da wahala a juyar da injiniyoyi ko kwafi.
Hakanan al'ada ce ta gama gari don haɗa duk fayilolin PHP don gidan yanar gizon guda ɗaya cikin fayil ɗaya. Wannan yana da fa'idodi da yawa. Yana rage adadin buƙatun HTTP da ake buƙatar yin don samun duk abubuwan da ke cikin gidan yanar gizon. Har ila yau, yana sa ƙaddamarwa da gzip ya fi tasiri.
Misalin Karamin PHP
Bayanan shigarwa:
<!DOCTYPE html>
<html>
<body>
<h1>My first PHP page</h1>
<?php
echo "Hello World!";
$color = "red";
echo "My car is " . $color . "<br>";
echo "My house is " . $COLOR . "<br>";
echo "My boat is " . $coLOR . "<br>";
?>
</body>
</html>
Bayanan fitarwa
<!DOCTYPE html>
<html>
<body>
<h1>My first PHP page</h1>
<?php
echo "Hello World!"; $color = "red"; echo "My car is " . $color . "<br>"; echo "My house is " . $COLOR . "<br>"; echo "My boat is " . $coLOR . "<br>"; ?>
</body>
</html>