PHP短标签与长标签 [英] PHP short open tag vs long open tag
本文介绍了PHP短标签与长标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
可以使用PHP短标签吗?
Possible Duplicate:
Are PHP short tags acceptable to use?
使用哪个更好,或被认为是更好的做法:<?php
或<?
.我一直想知道.还是对程序员更偏爱.
Which is better to use, or considered better practice: <?php
or <?
. I've always wanted to know. Or is it more of a preference for the programmer.
推荐答案
<?php
是官方标准.我从来没有遇到过让浏览器感到困惑的问题,但是仅仅使用<?
也可以声明XML,这可能不是形成表单的最佳习惯.
<?php
is the official standard. I've never encountered a problem where a browser was confused, but just using <?
can also declare XML and might not be the best habit to form.
不过,我会告诉您-其他程序员将始终赞赏该标准.我肯定会选择<?php
.
I'll tell you this though - other programmers will always appreciate the standard. I would go with <?php
for sure.
这篇关于PHP短标签与长标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文