PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 3rd, 2009, 07:05 PM
studeoc studeoc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 156 studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level)studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level)studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level)studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level)studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level)studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 9 h 31 m 15 sec
Reputation Power: 30
Question What does this mean

This may be a stupid question but....

What does it mean/do when you open php tags like

PHP Code:
<?=  ?>


Instead of the standard

PHP Code:
<?php  ?>


Came across it today.

Thanks.

Reply With Quote
  #2  
Old July 3rd, 2009, 07:12 PM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Dec 2004
Posts: 3,227 E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 16th Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 17 h 39 m 4 sec
Reputation Power: 2061
PHP Code:
<?=$variable?>


Is the same as:
PHP Code:
<?php echo $variable?>


but you should not use it because it is disabled by default and is therefore likely to cause portability problems with your code.

Reply With Quote
  #3  
Old July 3rd, 2009, 07:16 PM
studeoc studeoc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 156 studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level)studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level)studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level)studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level)studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level)studeoc User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 9 h 31 m 15 sec
Reputation Power: 30
Thanks.

I personally would never use it. I came across it in the Wordpress files. They use is sparingly it seems.

Reply With Quote
  #4  
Old July 6th, 2009, 09:13 AM
ManiacDan's Avatar
ManiacDan ManiacDan is offline
User, Contributing
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Oct 2006
Location: Texas, USA
Posts: 3,776 ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level)ManiacDan User rank is General 11st Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 19 h 31 m 26 sec
Reputation Power: 1677
It's considered a "shortcut" and is generally bad practice. It's still valid, and most people have it turned on, but if you forget to turn it on when you migrate to a new host you'll run into problems.

It also leads to the combination of shortcuts, like:
PHP Code:
<?=$someVar == $someOtherVar $thirdVar "No match"?>
-Dan
__________________
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

Think we're being rude? Please read this. Trying to argue intelligently? Please read this.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > What does this mean


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
Stay green...Green IT