Re: [PHP] Concatenation vs. Interpolation

2007-08-13 Thread Richard Lynch
On Sat, August 11, 2007 2:21 am, AmirBehzad Eslami wrote: > I know that the performance here is not very much, but is it > considerable in a high-traffic website? It's almost for sure meaningless in any real-world website. Use "valgrind callgrind" to find your real bottlenecks, and focus on those

Re: [PHP] Concatenation vs. Interpolation

2007-08-12 Thread Danial Rahmanzadeh
In my opinion, concatenation reduces code readability because unlike java(that uses + operator), php uses dot(.) for concatenation consider the following codes: //java String mystr="hello"+"world"; is more readable from: //php $mystr="hello"."world"; if you only need echoing something to output(wh

Re: [PHP] Concatenation vs. Interpolation

2007-08-11 Thread AmirBehzad Eslami
You're right. There is a low benefit in performance. But I think it's valuable in high-traffic websites. Of course, we should consider a lot of thing to have a better performance, but Concatenation, IMO, is the best practice. Let me explain: ŮŽActually, the programmers' preference on readability an

Re: [PHP] Concatenation vs. Interpolation

2007-08-11 Thread Tijnema
On 8/11/07, AmirBehzad Eslami <[EMAIL PROTECTED]> wrote: > Hi, > > FASTER CODE! > > This question involves Coding Style, Readability, Write-ability and > Performance. > Some people use the . operator to concat an string to a variable, some > people use interpolation (embeding variable into string).

[PHP] Concatenation vs. Interpolation

2007-08-11 Thread AmirBehzad Eslami
Hi, FASTER CODE! This question involves Coding Style, Readability, Write-ability and Performance. Some people use the . operator to concat an string to a variable, some people use interpolation (embeding variable into string). = 1st Method (Concatenation) $str = 'My name is '