Re: Back to Basics - Why Use Single Quotes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2008-08-01 at 15:36 -0400, Eric Butera wrote:
> On Fri, Aug 1, 2008 at 4:18 AM, Peter Ford <pete@xxxxxxxxxxxxx> wrote:
> >
> > Now *that's* a good reason... anything that means fewer \'s or \"s.
> > I often go for HEREDOC syntax if the backslashes start taking over -
> > readability is much more important to me than nanoseconds of performance.
> >
> > There's also the case where you might want literal $s in your string:
> > e.g.
> > $foo = 'You need to pay $dollars...';
> >
> > compared with
> >
> > $foo = "You need to pay \$dollars...";
> >
> > Again, it depends on you view of backslashes.
>
>
> You know, I'd use HEREDOC if I could have the closing line indented.
> I always think it looks so goofy to have it on the first of a line
> inside a method in a class.  When things get really weird I tend to
> use (s)printf.

*lol* Yeah, I hate how HEREDOC ruins my nice formatting too.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux