PHP - To echo or not to echo?

前端 未结 7 1043
[愿得一人]
[愿得一人] 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 that; ?> tell a story :)

提交回复
热议问题