开发者

Parsing multiple PHP code blocks among HTML

开发者 https://www.devze.com 2023-04-02 09:08 出处:网络
When inserting <?php?> Chunks into html it is easier for me to do ... <?php?> some html <?php?> some html<?php?> ect.

When inserting

<?php  ?>

Chunks into html it is easier for me to do ...

<?php  ?> some html <?php  ?> some html  <?php  ?> ect. 

Is it b开发者_如何转开发etter to do something like this...

<?php  echo "some html" ect. ?>

and if so how much is using the first method going to slow down my code?


The PHP interpreter evaluates only the code between a pair of <?php ?> tags. While there might be a speed difference (I doubt it), even if one existed the difference would be completely undetectable.

I'd go with code readability.

0

精彩评论

暂无评论...
验证码 换一张
取 消