Good PHP code should be structured.
Excellent PHP code should be standardized.
Good PHP code should be adaptive.
Good PHP code should be safe.
What are the advantages and disadvantages of PHP code?
Copy to Clipboard![烈火提示:点击查看 Liehuo.Net Codes](http://www.bkjia.com/images/quote.gif)
Quoted content:
[www.bkjia.com]
1. Unoptimized php code
echo("
Search results for query: " .
$_GET['query'] . ".
" );
?>
2. Simple optimized code
echo("
Search results for query: " .
htmlspecialchars($_GET[' query']) . “.
”);
?>
3. Reasonably optimized code
if (isset($_GET['query ']))
{
echo '
Search results for query: ',
htmlspecialchars($_GET['query'], ENT_QUOTES), '.
';
}
?>
http://www.bkjia.com/PHPjc/363959.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/363959.htmlTechArticleExcellent PHP code should be structured. Good PHP code should be standardized. Good PHP code should be adaptive. Good PHP code should be safe. Advantages of PHP code...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn