<slide>
<title>The Internet is Full of Nonsense</title>

<div effect="fade-out">
<break lines="6"/>
<blurb class="large" align="center">A small selection of PHP optimisation tips I found on the internet</blurb>
</div>

<div effect="fade-in-out">
<break lines="6"/>
<blurb align="center">echo is faster than print</blurb>
</div>

<div effect="fade-in-out">
<break lines="6"/>
<blurb align="center">Use pre-incrementing where possible as it is 10% faster</blurb>
<example><![CDATA[
++$i;
//is faster than
$i++;
]]></example>
</div>

<div effect="fade-in-out"><break lines="6"/><blurb align="center">Methods in derived classes run faster than ones defined in the base class.</blurb></div>

<div effect="fade-in-out"><break lines="6"/><blurb align="center">A function call with one parameter and an empty function body takes about the same time as doing 7-8 $localvar++ operations. A similar method call is of course about 15 $localvar++ operations.</blurb></div>

<div effect="fade-in-out"><break lines="6"/><blurb align="center">Not everything has to be OOP, often it is just overhead, each method and object call consumes a lot of memory.</blurb></div>

<div effect="fade-in-out"><break lines="6"/><blurb align="center">Avoid overusing function calls.
Calling a function in PHP is very expensive, so avoid it whenever you can.</blurb></div>

</slide>
