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
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
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
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
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)
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
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;
> >>
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
>>
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
[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
10 matches
Mail list logo