Re: [PHP] PHP String convention

2009-11-04 Thread Lars Torben Wilson
emax.dk] > Sent: Wednesday, October 28, 2009 10:18 AM > To: Nick Cooper > Cc: Jim Lucas; php-general@lists.php.net > Subject: Re: [PHP] PHP String convention > > Hi Nick > > Nick Cooper wrote on 2009-10-28 17:29: > >> Thank you for the quick replies. I thought metho

Re: [PHP] PHP String convention

2009-10-28 Thread Robert Cummings
Kim Madsen wrote: Hi Nick Nick Cooper wrote on 2009-10-28 17:29: Thank you for the quick replies. I thought method 2 must be faster because it doesn't have to search for variables in the string. So what is the advantages then of method 1 over 3, do the curly braces mean anything? 1) $string

Re: [PHP] PHP String convention

2009-10-28 Thread Ashley Sheridan
On Wed, 2009-10-28 at 18:18 +0100, Kim Madsen wrote: > Hi Nick > > Nick Cooper wrote on 2009-10-28 17:29: > > > Thank you for the quick replies. I thought method 2 must be faster > > because it doesn't have to search for variables in the string. > > > > So what is the advantages then of method 1

RE: [PHP] PHP String convention

2009-10-28 Thread Warren Vail
The curly braces look like something from the smarty template engine. Warren Vail -Original Message- From: Kim Madsen [mailto:php@emax.dk] Sent: Wednesday, October 28, 2009 10:18 AM To: Nick Cooper Cc: Jim Lucas; php-general@lists.php.net Subject: Re: [PHP] PHP String convention Hi

Re: [PHP] PHP String convention

2009-10-28 Thread Kim Madsen
Hi Nick Nick Cooper wrote on 2009-10-28 17:29: Thank you for the quick replies. I thought method 2 must be faster because it doesn't have to search for variables in the string. So what is the advantages then of method 1 over 3, do the curly braces mean anything? 1) $string = "foo{$bar}"; 2)

Re: [PHP] PHP String convention

2009-10-28 Thread Jim Lucas
Nick Cooper wrote: > 2009/10/28 Jim Lucas: >> Nick Cooper wrote: >>> Hi, >>> >>> I was just wondering what the difference/advantage of these two >>> methods of writing a string are: >>> >>> 1) $string = "foo{$bar}"; >>> >>> 2) $string = 'foo'.$bar; >>> >>> I always use method 2 but have been notici

Re: [PHP] PHP String convention

2009-10-28 Thread Ashley Sheridan
On Wed, 2009-10-28 at 16:29 +, Nick Cooper wrote: > 2009/10/28 Jim Lucas: > > Nick Cooper wrote: > >> Hi, > >> > >> I was just wondering what the difference/advantage of these two > >> methods of writing a string are: > >> > >> 1) $string = "foo{$bar}"; > >> > >> 2) $string = 'foo'.$bar; > >>

Re: [PHP] PHP String convention

2009-10-28 Thread Nick Cooper
2009/10/28 Jim Lucas: > Nick Cooper wrote: >> Hi, >> >> I was just wondering what the difference/advantage of these two >> methods of writing a string are: >> >> 1) $string = "foo{$bar}"; >> >> 2) $string = 'foo'.$bar; >> >> I always use method 2 but have been noticing method 1 more and more in >>

Re: [PHP] PHP String convention

2009-10-28 Thread Jim Lucas
Nick Cooper wrote: > Hi, > > I was just wondering what the difference/advantage of these two > methods of writing a string are: > > 1) $string = "foo{$bar}"; > > 2) $string = 'foo'.$bar; > > I always use method 2 but have been noticing method 1 more and more in > source code. Is this just user

RE: [PHP] PHP String convention

2009-10-28 Thread Jay Blanchard
[snip]I was just wondering what the difference/advantage of these two methods of writing a string are:[/snip] Method 2 is faster, YMMV. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP String convention

2009-10-28 Thread Nick Cooper
Hi, I was just wondering what the difference/advantage of these two methods of writing a string are: 1) $string = "foo{$bar}"; 2) $string = 'foo'.$bar; I always use method 2 but have been noticing method 1 more and more in source code. Is this just user preference? I would use a generic search