9.3.3 Return value
Find ways to structure your program to fit its purpose. For example:
if (booleanExpression) {
return true;
} else {
return false;
}
should be replaced by the following method:
return booleanExpression ;
Similarly:
if (condition) {
return x;
}
return y;
should be written as:
return (condition ? x : y);
http://www.bkjia.com/PHPjc/532578.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532578.htmlTechArticle9.3.3 Return values Try to make your program structure fit for purpose. For example: if (booleanExpression) { return true; } else { return false; } should be replaced by the following method: return booleanExpr...
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