Re: <? vs <?PHP
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: <? vs <?PHP

From: Andy Jeffries <news@andyjeffries.co.uk>
Date: Mon Apr 17 2006 - 21:59:17 CEST

On Mon, 17 Apr 2006 00:13:32 +0100, Paul Lautman wrote:
> I often see the former starting delimiter rather than the latter. Is there
> some rule about where the former can be used?

While I agree with CJ and Scott, there is a useful construct that can be
used with short tags (<?) and if your code is running on a server you
control (as can be the case for a lot of web developers, run clients code
on servers you control) it can make for easier to read code:

<?=$foo?>

is equivalent to:

<?php echo $foo ?>

Anyway, just thought I'd add that in.

Cheers,

Andy

-- 
Andy Jeffries MBCS CITP ZCE   | gPHPEdit Lead Developer
http://www.gphpedit.org       | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
Received on Mon May 1 02:58:14 2006