SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast knojiyak's Avatar
    Join Date
    Oct 2013
    2 Post(s)
    0 Thread(s)

    what is different between in this?

    Hello friends,

    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.

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts