<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Mon, 20 May 2013 15:58:57 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[SitePoint PHP Blog: High-Performance String Concatenation in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15232</guid>
      <link>http://www.phpdeveloper.org/news/15232</link>
      <description><![CDATA[<p>
On the SitePoint PHP Blog there's a new post today looking at <a href="http://blogs.sitepoint.com/2010/10/05/high-performance-string-concatenation-in-php/">performance in string concatenation</a> where they compare some of the different methods for appending values and which might give you that minute edge.
</p>
<blockquote>
This could be a more important to your application: large string operations are often handled on the server when generating HTML pages. There are no special libraries in the standard PHP installation and string concatenation is implemented using the dot operator. [...] You can also join an array of strings using the <a href="http://php.net/manual/en/function.implode.php">implode</a> function.
</blockquote>
<p>
In order to simulate a larger set of string concatenations, they create a loop of 30,000 and append a simple string - "String concatenation." - each time. One method uses the standard period append method and the other uses implode after appending to an array. The result of their testing is that the array/implode method takes twice as long as the standard period/append operator. Take into account, however, that for most applications, the performance difference will be so small, it wouldn't be noticed.
</p>]]></description>
      <pubDate>Tue, 05 Oct 2010 12:08:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Naberezny's Blog: PHP Temporary Streams]]></title>
      <guid>http://www.phpdeveloper.org/news/11243</guid>
      <link>http://www.phpdeveloper.org/news/11243</link>
      <description><![CDATA[<p>
Following up on <A href="http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html">this post</a> from <i>David Sklar</i>, <i>Mike Naberezny</i> has come up with a <a href="http://mikenaberezny.com/2008/10/17/php-temporary-streams/">few methods of his own</a> to come up with his "thousand string concatenations".
</p>
<blockquote>
It's been a while since David Sklar <a href="http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html">called out</a> to let a thousand string concatenations bloom. That discussion produced some entertaining suggestions for putting strings together such as using preg_replace and calling out to MySQL with SELECT CONCAT. 
</blockquote>
<p>
<i>Mike</i> goes with a bit different media of choice - the filesystem functions and streams. One example opens a file, writes to the file then rewinds back to the beginning of the stream. He modified this to make it slightly more useful (writing to memory not the file system) and shows how it could be used to make a temporary stream for testing purposes.
</p>]]></description>
      <pubDate>Mon, 20 Oct 2008 07:52:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stoyan Stefanov's Blog: JS/PHP string concatenation mistype]]></title>
      <guid>http://www.phpdeveloper.org/news/8944</guid>
      <link>http://www.phpdeveloper.org/news/8944</link>
      <description><![CDATA[<p>
"Cross-over" developers out there (those that use PHP and Javascript on a regular basis) can sometimes get confused by little syntax things. <i>Stoyan Stefanov</i> got <a href="http://www.phpied.com/jsphp-string-concatenation-mistype/">tripped up</a> by just such an issue.
</p>
<blockquote>
The front-end developer is a strange beast who has to jiggle to and fro and code in several languages literally at the same time - javascript, html, css, php or some other server side language, some SQL dialect... No wonder that sometimes we make silly mistakes.
</blockquote>
<p>
His issue was with appending - in Javascript, it's a plus but in PHP, it's a period. Unfortunately, the problem can be hard to track down since Javascript also has a use for the period operator - treating the preceding thing like an object.
</p>]]></description>
      <pubDate>Wed, 31 Oct 2007 12:04:00 -0500</pubDate>
    </item>
  </channel>
</rss>
