News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

The short tag '<?' or the long tag '<?php' ?

Started by NathanKP, October 18, 2007, 11:40:29 AM

Previous topic - Next topic

NathanKP

Is it better to use the short PHP tag "<?" or the long PHP tag "<?php"?  I've seen both used quite extensively, but I noticed that web hosts have to enable the short tag in php.ini.  Is the short tag usually supported by web hosts, or should I use the long tag to be on the safe side?

NathanKP

codenaught

I would definitely recommend using <?php. I've never had problems with it, but I will tell you I have had problems using the <? tag before.
Dev Consultant
Former SMF Doc Coordinator

NathanKP


mindphp

Quote from: akabugeyes on October 18, 2007, 11:41:52 AM
I would definitely recommend using <?php. I've never had problems with it, but I will tell you I have had problems using the <? tag before.
if you use <?
php.ini --->short_opentag=On


A12

I only ever use <?php for compatibility reasons, as not every server has short tags enabled(a.k.a what mindphp said lol...).

mindphp


MF30

Quote from: akabugeyes on October 18, 2007, 11:41:52 AM
I would definitely recommend using <?php. I've never had problems with it, but I will tell you I have had problems using the <? tag before.

Ty. :P

Advertisement: