php echo vs open&close tag

后端 未结 6 1081
清歌不尽
清歌不尽 2020-12-01 11:16

Just to clarify: The issues \"echo vs print\" and \"double quotes vs single quotes\" are perfectly understood, this is about another thing:

Are there any re

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 11:47

    It's very dependable what you write. PHP can be used as programming language, or as simple and powerful web-template language. Mixing of this two usages very, very bad practice and will be horrible to support in long term.

    So Second style is more usable in templates with lot of html markup and little spots of code, first - for 'clear' php programming.

提交回复
热议问题