Another thing to consider is XML. Some people (myself included) create XML files on a regular basis. The PHP short tag <? can easily be confused by XML parsers, because it is the same as the beginning of a Processing Instruction. For example: <?xml version="1.0" encoding="iso-8859-1" ?>
The problem doesn't usually arise, because the server strips the page of PHP as it is being served; however, it is better to be safe than sorry, eh?

--------------------------------------
Simon Jessey
business: http://keystonewebsites.com/
personal: http://jessey.net/blog/
e: [EMAIL PROTECTED]

 
-----Original Message-----
From: Beau Lebens [mailto:[EMAIL PROTECTED]
Subject: RE: [WSG] PHP Question...

<?php is more reliable - you can configure a server to ignore "<?" as an opening PHP tag (short_tags i think the directive is from memory).
 
for compatibilities sake, you should always use the <?php tag in your coding, but if short tags are enabled, then technically the 2 are the same (both just define a block of PHP code)
-----Original Message-----
From: Chris Stratford [mailto:[EMAIL PROTECTED]
Subject: [WSG] PHP Question...

 

 

Wondering, what is the difference between using:

 

<?

/* php code */
?>

 

as opposed to:

 

<?PHP

/* php code */

?>

 

Reply via email to