Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-08-01 Thread Peter Ford
Eric Butera wrote: On Wed, Jul 30, 2008 at 6:51 PM, Stephen [EMAIL PROTECTED] wrote: I have traditionally used double quotes going back to my PASCAL days. I see many PHP examples using single quotes, and I began to adopt that convention. Even updating existing code. And I broke some stuff

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-08-01 Thread Eric Butera
On Fri, Aug 1, 2008 at 4:18 AM, Peter Ford [EMAIL PROTECTED] 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

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-08-01 Thread Robert Cummings
On Fri, 2008-08-01 at 15:36 -0400, Eric Butera wrote: On Fri, Aug 1, 2008 at 4:18 AM, Peter Ford [EMAIL PROTECTED] 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

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-08-01 Thread tedd
At 3:41 PM -0400 8/1/08, Robert Cummings wrote: *lol* Yeah, I hate how HEREDOC ruins my nice formatting too. Cheers, Rob. Yeah, me too. I just slam everything full-left and then I know it's a HEREDOC. Cheers, tedd -- --- http://sperling.com http://ancientstones.com

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-07-31 Thread Dan Shirah
Thanks for the nice explanation, Dan! On 7/30/08, Daniel Brown [EMAIL PROTECTED] wrote: On Wed, Jul 30, 2008 at 6:51 PM, Stephen [EMAIL PROTECTED] wrote: I have traditionally used double quotes going back to my PASCAL days. I see many PHP examples using single quotes, and I began to adopt

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-07-31 Thread Richard Heyes
Single quotes do still recognise \' and \\ though, for getting a single quote and backslash. IIRC (which isn't likely) they're the only two. -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-07-31 Thread Eric Butera
On Wed, Jul 30, 2008 at 6:51 PM, Stephen [EMAIL PROTECTED] wrote: I have traditionally used double quotes going back to my PASCAL days. I see many PHP examples using single quotes, and I began to adopt that convention. Even updating existing code. And I broke some stuff that was doing

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-07-31 Thread Eric Butera
On Wed, Jul 30, 2008 at 7:03 PM, mike [EMAIL PROTECTED] wrote: On 7/30/08, Stephen [EMAIL PROTECTED] wrote: But I wonder, is there any reason to use single quotes? extremely minor performance gains, afaik. probably moreso when doing $foo[bar] and $foo['bar'] but i believe it's negligible

[PHP] Back to Basics - Why Use Single Quotes?

2008-07-30 Thread Stephen
I have traditionally used double quotes going back to my PASCAL days. I see many PHP examples using single quotes, and I began to adopt that convention. Even updating existing code. And I broke some stuff that was doing variable expansion. So I am back to using double quotes. But I

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-07-30 Thread mike
On 7/30/08, Stephen [EMAIL PROTECTED] wrote: But I wonder, is there any reason to use single quotes? extremely minor performance gains, afaik. probably moreso when doing $foo[bar] and $foo['bar'] but i believe it's negligible $foo = 'bar' and $foo = bar sara golemon did some performance

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-07-30 Thread Daniel Brown
On Wed, Jul 30, 2008 at 6:51 PM, Stephen [EMAIL PROTECTED] wrote: I have traditionally used double quotes going back to my PASCAL days. I see many PHP examples using single quotes, and I began to adopt that convention. Even updating existing code. And I broke some stuff that was doing