Tuesday, June 27, 2006

 

Avoid using Large String Concatenation

When do concatenation string, avoid uniting with large size string. It can obstructing code execution that really can display more faster.

//large string concatenation
$title = ‘title’;
$body = ‘…a very large block…’;
echo “Subject: $title\n\n$body”;

//avoid large string concatenation
$title = ‘title’;
$body = ‘…a very large block…’;
echo “Subject: $title\n\n”;
echo $body;

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home