<?php echo $ var;之间有速度差异吗? ?>和<?= $ var?> ;?
问题描述:
这两个版本之间有速度差异吗?
Is there any speed difference between these two versions?
<?php echo $var; ?>
<?=$var?>
您推荐谁,为什么?
答
性能差异不明显.此外,使用APC时,性能差异为零,零,nada.
Performance difference is insignificant. Moreover, with use of APC, performance difference is zero, null, nada.
短标签在XML中是有问题的,因为<?
也是XML处理标签的标记.因此,如果您要编写可移植的代码,请使用长格式.
Short tags are problematic within XML, because <?
is also markup for XML processing tag. So if you're writing code that should be portable, use the long form.
请参见 http://www.php.net中的short_open_tag
描述. /manual/en/ini.core.php
See short_open_tag
description in http://www.php.net/manual/en/ini.core.php