<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Intrepid Blog &#187; performance</title>
	<atom:link href="http://blog.affien.com/archives/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.affien.com</link>
	<description>A few thoughts</description>
	<lastBuildDate>Mon, 01 Mar 2010 00:58:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Skins and performance in PHP</title>
		<link>http://blog.affien.com/archives/2005/02/13/skins-and-performance-in-php/</link>
		<comments>http://blog.affien.com/archives/2005/02/13/skins-and-performance-in-php/#comments</comments>
		<pubDate>Sun, 13 Feb 2005 22:58:10 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[skin]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2005/02/13/skins-and-performance-in-php/</guid>
		<description><![CDATA[There are several ways to use skins in PHP, I&#8217;ve put some through a performance test.
Basicly you can use either evaluated PHP or a string that will undergo str_replace&#8217;s.
When evaluating PHP in a file it seems to be faster than replacing tags in a string. This for PHP streams through the file during execution instead [...]]]></description>
			<content:encoded><![CDATA[<p>There are several ways to use skins in PHP, I&#8217;ve put some through a performance test.</p>
<p>Basicly you can use either evaluated PHP or a string that will undergo str_replace&#8217;s.</p>
<p>When evaluating PHP in a file it seems to be faster than replacing tags in a string. This for PHP streams through the file during execution instead of handling one big string. The difference is minimal though (15% in  my tests).</p>
<p>Although when the PHP code is placed in a string instead of in a file which has to be done in case a string is cached in a database or is generated from compiling from another format it is significantly slower than using str_replace&#8217;s on a normal string (600%!), this is because the original sourcecode, the intermediate code and the return from the code all take a lot of memory.</p>
<p>Either use cached PHP files or a string with tags instead of PHP code in a database, never the otherway around (what happens very often).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2005/02/13/skins-and-performance-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
