[FX.php List] [OT] PHP Shorthand
Jonathan Schwartz
jschwartz at exit445.com
Tue May 13 09:19:18 MDT 2008
Thanks guys.
I just wanted to know if the shorthand was something new. Had never
seen "<?=$MSG?>" before.
It not only skips the opening "php", it skips the "echo" and closing semicolon.
J
At 5:14 PM +0200 5/13/08, Gjermund Gusland Thorsen wrote:
>Well at the time when I started scripting php it really did not
>matter, these days there are more filetypes...
>
>Therefore <?php
>?>
>
>is the way to go.
>
>ggt
>
>2008/5/13 Dale Bengston <dbengston at tds.net>:
>> Us too. Since we can't control the client's environment, we have eliminated
>> short tags in our code.
>>
>> Dale
>>
>>
>>
>>
>> On May 13, 2008, at 7:03 AM, Derrick Fogle wrote:
>>
>> I recently read that PHP6 completely removes the Open Short Tags feature,
>> too. I used them quite liberally back in the day, but I don't anymore.
>>
>>
>> On May 12, 2008, at 11:24 PM, Jonathan Schwartz wrote:
>>
>> That's what I thought. But the code in question is used liberally in
>> PHPAuction.
>>
>> J
>>
>> At 10:29 PM -0400 5/12/08, Michael Layne wrote:
>> 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
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>>
>> --
>>
>> 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
>>
>>
>> _______________________________________________
>> 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
--
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-381-1852
More information about the FX.php_List
mailing list