PHP - To echo or not to echo?

前端 未结 7 1031
[愿得一人]
[愿得一人] 2021-01-31 06:05

What is more efficient and/or what is better practice, to echo the HTML or have many open and close php tags?

Obviously for big areas of HTML it is sensible

相关标签:
7条回答
  • 2021-01-31 06:27

    Whichever makes sense to you. The performance difference is marginal, even if a large echo is faster.

    But an echo of a big string is hard to read and more <?php echo $this->that; ?> tell a story :)

    0 讨论(0)
提交回复
热议问题