[FX.php List] [OT] PHP Shorthand

Michael Layne fx at 9degrees.com
Mon May 12 20:29:56 MDT 2008


Also, I'm not a PHP contributor, but in PHP5, you have to explicitly  
allow short tags.

 From most default PHP5 installations:

<? echo $msg; ?>

won't work

Got to use

<?php echo $msg; ?>

Only feel safe with shorthand if you control the server - that's been  
my experience.

Here's a thread that walks you through the argument...

http://www.webhostingtalk.com/showthread.php?t=617661

HTH.

Michael

On May 12, 2008, at 8:10 PM, Nick wrote:

> you can but it is not advised to use anything but <?php
> as various server configurations won't be compatible with the  
> shorthand versions.
>
> On Mon, May 12, 2008 at 6:26 PM, Jonathan Schwartz <jschwartz at exit445.com 
> > wrote:
> Anyone use the following shorthand:
>
> <?=$MSG?>
>
> versus
>
> <?php echo $MSG; ?>
>
> Just saw this for the first time.
>
> Jonathan
> -- 
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-381-1852
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20080512/7b253ff8/attachment-0001.html


More information about the FX.php_List mailing list