Jump to content

what is '<?='


samona

Recommended Posts

<? ?> and <?= ?> are called short tags. These can only be used if the setting called short_open_tag is enabled. However it is not recommended to use these tags as not all PHP configurations have this setting enabled. You're better of of using the full PHP tag syntax <?php ?> and  <?php echo ?>

Link to comment
https://forums.phpfreaks.com/topic/189208-what-is/#findComment-998894
Share on other sites

Although I don't disagree with wildteen88 in terms of the basic consensus, I don't seem much of a problem with using short tags, if you can control the server environment.  Sometimes these issues have a way of being pushed by the people who write projects used by the masses, when there is more people writing php for sites or businesses where there is no concern about control of the php.ini file, or being able to enable short tags.  Up until version 5.3 the default was to have short tags set to on.

 

I don't have a problem with short tags, especially when used in templates.  For example, there's no doubt that template writers will prefer:

 

= $pageheader ?>

 

Rather than the tedium of

 


 

 

 

Link to comment
https://forums.phpfreaks.com/topic/189208-what-is/#findComment-998914
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.