SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast knojiyak's Avatar
    Join Date
    Oct 2013
    Posts
    66
    Mentioned
    2 Post(s)
    Tagged
    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
    Location
    The Netherlands
    Posts
    9,037
    Mentioned
    152 Post(s)
    Tagged
    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

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy


Bookmarks

Posting Permissions

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