Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Programming

Like Tree3Likes

Reply
 
LinkBack Thread Tools Display Modes
Old 10-27-2011, 07:00 PM   #1
Silver Member
 
Join Date: Jul 2011
Posts: 163
Default PHP Short Tags

I use short tags in my code often because they are quite convenient. However it seems that the developers of PHP don't really like them and are considering removing them. Here is a good discussion on the matter:

http://stackoverflow.com/questions/2...eptable-to-use

For purely philosophical reasons I try to obey strict xhtml when I format webpages. But I am unsure of the major philosophy behind short tag removal. Does anyone here have any opinions on the subject?
__________________
http://www.skepticize.me
Absolution is offline   Reply With Quote


Old 10-27-2011, 07:26 PM   #2
Gold Member
 
Join Date: Feb 2011
Location: Australia
Posts: 369
Default

I'm pretty sure I have read that ages ago.

Never really made much since to me anyway, it's not like it's short hand that spans throughout the whole spectrum of code so you are only talking a handful of bits worth of data saved anyway.

So in other words it's pointless, hence it's eventual removal.
Absolution likes this.
__________________
Jason H.
DHDdirect.com
Domains - Hosting - Design
DHDdirect is offline   Reply With Quote
Old 10-27-2011, 08:43 PM   #3
Silver Member
 
Join Date: Jul 2011
Posts: 163
Default

Quote:
Originally Posted by DHDdirect View Post
I'm pretty sure I have read that ages ago.

Never really made much since to me anyway, it's not like it's short hand that spans throughout the whole spectrum of code so you are only talking a handful of bits worth of data saved anyway.

So in other words it's pointless, hence it's eventual removal.
True, philosophically it tends to be better to get things done with a simple set of tools in combination, rather than a complex set of tools. Especially if the added tool yields no new information.
__________________
http://www.skepticize.me
Absolution is offline   Reply With Quote
Old 11-04-2011, 01:00 PM   #4
Silver Member
 
Join Date: Aug 2011
Posts: 100
Default

If you've ever ported a website from a host that allows them to a host that does not then you realise the faff involved when making the website compliant.

It's safer just to use <?php just to be sure, 3 characters for the sake of compliance!
Absolution likes this.
__________________
Mark R

Wubbleyou - Web Design Newcastle
A professional web design agency based in Newcastle upon Tyne servicing clients based throughout the U.K.

Home spray tan machine - Landlord Reviews
MarkR is offline   Reply With Quote
Old 11-06-2011, 11:52 PM   #5
Silver Member
 
Join Date: Jul 2011
Posts: 163
Default

Thanks for your comments! Philosophically they dont seem needed in the programming code. I think in the future I will do without them.
__________________
http://www.skepticize.me
Absolution is offline   Reply With Quote


Old 11-08-2011, 04:40 PM   #6
Bronze Member
 
n1c0_ds's Avatar
 
Join Date: Nov 2009
Location: Granby, Québec
Posts: 55
Send a message via Skype™ to n1c0_ds
Default

It's mostly because of portability issues. I don't use them, but they are really useful for inline PHP since it maintains readability.
__________________
Nicolas Bouliane
Web designer/developer in Granby, Québec
n1c0_ds is offline   Reply With Quote
Old 11-15-2011, 04:39 PM   #7
Silver Member
 
Join Date: Aug 2011
Posts: 100
Default

The worst part is if short tags are disabled on a configuration where they were previously allowed the server will sometimes output the script to the user as plain text. Never an ideal scenario.
__________________
Mark R

Wubbleyou - Web Design Newcastle
A professional web design agency based in Newcastle upon Tyne servicing clients based throughout the U.K.

Home spray tan machine - Landlord Reviews
MarkR is offline   Reply With Quote
Old 11-15-2011, 05:00 PM   #8
Silver Member
 
Join Date: Jul 2011
Posts: 163
Default

Quote:
Originally Posted by MarkR View Post
The worst part is if short tags are disabled on a configuration where they were previously allowed the server will sometimes output the script to the user as plain text. Never an ideal scenario.
I noticed that when I installed PHP on an apache server, definitely not a secure situation!
__________________
http://www.skepticize.me
Absolution is offline   Reply With Quote
Old 11-25-2011, 02:55 PM   #9
Silver Member
 
Join Date: Mar 2011
Posts: 231
Default

I really haven't grasped fully what you mean by short tags.
computerGeek is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:37 PM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.