在尝试在我的公司内移动更多的完整堆栈时,我会非常注意地使用未使用非PHP代码分隔的打开/关闭标记。看看PSR标准,我无法找到与此相关的任何内容。我确实理解这种方法没有性能问题,因为语法通常不会影响页面性能。
<?php echo $this->getChildHtml('stock.notifications') ?>
<?php echo $this->getChildHtml('tierprices') ?>
<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
<?php echo $this->getChildHtml('extrahint') ?>
这仍然被认为是正确/可读的模式,或者当我遇到这样的模式时,我应该考虑重构:
<?php
echo $this->getChildHtml('stock.notifications');
echo $this->getChildHtml('tierprices');
echo $this->getReviewsSummaryHtml($_product, false, true);
echo $this->getChildHtml('extrahint') ;
?>