1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Please reply if your server does NOT allow short PHP tags <? ?>

Discussion in 'PHP' started by WebGodzilla, Jan 10, 2009.

  1. #1
    Hi,

    I'm just interested if there are hosts out there that really force PHP developers to use full PHP tags only: <?php ... ?>

    If you tried to write just <?...?> and your code didn't work because these short tags are not allowed, please reply with the hosting company and plan information.

    I'm just so curious about it because personally I NEVER encountered this restriction.
     
    WebGodzilla, Jan 10, 2009 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    Personally I haven't either but I have seen a few Forum posts over the years where the addition of full tags was reported to solve the problem so I always include or update them if working with a third party script.

    Three extra keystorkes aren't that much effort!
     
    Colbyt, Jan 10, 2009 IP
  3. crivion

    crivion Well-Known Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    160
    Digital Goods:
    3
    #3
    You can always enable it in your php.ini
     
    crivion, Jan 10, 2009 IP
  4. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #4
    It is more professional to use <?php. In most PHP contests, you will get points deducted for using the shorter version.

    Peace,
     
    Barti1987, Jan 10, 2009 IP
  5. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #5
    Short tags are a joke, all they do is lower the portability of scripts.

    Always use <?php, <? is really unacceptable, even in templating.

    Dan
     
    Danltn, Jan 10, 2009 IP
  6. JWRmedia

    JWRmedia Banned

    Messages:
    499
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yes, as was mentioned, you should always use full <?php tags. Not doing so is bad coding.
     
    JWRmedia, Jan 10, 2009 IP