$string .= $new vs $string = $string . $new performance

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hey Guys,
Quick question about the PHP compiler, is there any performance
difference between

$string .= $new;


$string = $string . $new;

Does the compiler see them as equivalent and optimize to the later, or
does concatenate and then copy?

Can anyone point me to some documentation on this, I havent been able to
find anything on this particular topic?

Leigh Finch

Re: $string .= $new vs $string = $string . $new performance

.oO(Leigh Finch)

Quoted text here. Click to load it

Don't worry and google "premature optimization" if you want to.


Site Timeline