Current location: Hot Scripts Forums » Programming Languages » PHP » [SOLVED] What's the difference between <? ?> and <?php ?>


[SOLVED] What's the difference between <? ?> and <?php ?>

Reply
  #1 (permalink)  
Old 05-04-09, 12:46 AM
TWARITA TWARITA is offline
Newbie Coder
 
Join Date: Apr 2009
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] What's the difference between <? ?> and <?php ?>

Plz tell me the difference between <? ?> and <?php ?>

thanks in advance..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 05-04-09, 03:18 AM
Nikas Nikas is offline
Coding Addict
 
Join Date: Jun 2005
Location: Singapore
Posts: 377
Thanks: 0
Thanked 1 Time in 1 Post
<? ?> refers to PHP Short Tag.
<?php ?> refers to PHP Full Tag.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 05-04-09, 04:48 AM
umarmir_123 umarmir_123 is offline
Newbie Coder
 
Join Date: May 2009
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
they are just conventions to represent one thing..but yes we should use <?php?> instead of <? ?> because later one is not supported by all versions of mysql.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 05-04-09, 05:00 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
To answer your questions, the difference is that the short tags can be disabled in php.ini, so you can't rely on them.

Quote:
Originally Posted by umarmir_123 View Post
they are just conventions to represent one thing..but yes we should use <?php?> instead of <? ?> because later one is not supported by all versions of mysql.
You probably mean PHP, but at the moment, it looks like they're gonna keep them.

http://www.php.net/~derick/meeting-n...nd-add-php-var
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
<?php echo 'Hello World'; ?> aditya2071990 New Members & Introductions 0 06-24-08 05:07 AM
<?php echo "Hello World!"; ?> robertark New Members & Introductions 4 12-04-07 05:16 PM
print '<?php code here! ?> keeM PHP 1 05-13-05 11:07 PM


All times are GMT -5. The time now is 02:01 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.