Results 1 to 2 of 2
Oct 27, 2013, 09:46 #1
what is different between in this?
i am doing work on core php.
please tell me some element of php.
what is the different b/w in this element?
1) <?PHP ?>
2) <? ?>
3) <?= ?>
Thank you in advance
Please tell me if you know...
Last edited by spikeZ; Oct 27, 2013 at 10:18.
Oct 27, 2013, 11:53 #2
- Join Date
- Aug 2008
- The Netherlands
- 153 Post(s)
- 2 Thread(s)
In principle <? ?> and <?php ?> are the same, except that some servers the use of <? ?> is disabled (the setting is short_open_tag in php.ini, might you be interested) whereas <?php ?> is always supported.
<?= $something ?> is the equal to <?php echo $something ?> or indeed <? echo $something ?>. This syntax (<?= ?>) could be disabled on PHP versions prior to 5.4 (together with <? ?> via short_open_tag), but since 5.4 is always available, regardless of the short_open_tag setting.Rémon - Hosting Advisor
SitePoint forums will switch to Discourse soon! Make sure you're ready for it!
Minimal Bookmarks Tree
My Google Chrome extension: browsing bookmarks made easy