What Are the Differences Between <? echo
Possible Duplicates:
Are PHP short tags acceptable to use?
Is there a speed difference between <?php echo $var; ?> and <?=$var?>?
Imagine a server which has short tags enabled. If so, then is there any performance GAIN or HIT when calculating hundreds of these?
A
<? echo __("text to be translated") ?>
B
<?= __("text to be translated") ?>
Question: What are the Differences between the two, in terms of shere PHP processor power Thanks for your advice.
What are the Differences between the two, in terms of shere PHP processor power
I assume you mean execution speed, in which case there is no significant difference between the two.
they are functionally equivalent. The big difference, though, is with portability. Both require that you have the <? opening tags enabled in the php.ini (which is not always the case, and not always allowed on servers).
The most appropriate way to print is to open with the full <?php and then echo, like:
<?php echo __("text to be translated") ?>
This will work in any environment.
链接地址: http://www.djcxy.com/p/59434.html上一篇: 使用PHP shorthands不好?
下一篇: 有什么区别? 回声