<?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>Blog by Andreas Glaser &#187; PHP5</title>
	<atom:link href="http://www.andreas-glaser.com/tag/php5/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.andreas-glaser.com</link>
	<description>Development, Technology and such...</description>
	<lastBuildDate>Wed, 18 May 2011 23:16:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Kohana 3 &#8211; ErrorException [ Warning ]: htmlspecialchars() expects at most 3 parameters, 4 given</title>
		<link>http://www.andreas-glaser.com/2010/06/11/kohana-3-errorexception-warning-htmlspecialchars-expects-at-most-3-parameters-4-given/</link>
		<comments>http://www.andreas-glaser.com/2010/06/11/kohana-3-errorexception-warning-htmlspecialchars-expects-at-most-3-parameters-4-given/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 17:05:18 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Kohana]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Kohana 3.x]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=585</guid>
		<description><![CDATA[?View Code CODE1 ErrorException [ Warning ]: htmlspecialchars() expects at most 3 parameters, 4 given If Kohana 3 throws this exception, that means that your currently installed PHP version is lower than 5.2.3 . This can be easily be fixed by updating PHP to the latest stable version (recommended) or by changing one of Kohana [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p585code5'); return false;">View Code</a> CODE</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5855"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p585code5"><pre class="code" style="font-family:monospace;">ErrorException [ Warning ]: htmlspecialchars() expects at most 3 parameters, 4 given</pre></td></tr></table></div>

<p>If Kohana 3 throws this exception, that means that your currently installed PHP version is lower than 5.2.3 .<br />
This can be easily be fixed by updating PHP to the latest stable version (recommended) or by changing one of Kohana (not recommended).</p>
<h3>To fix it code wise open following file with your preferred editor</h3>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p585code6'); return false;">View Code</a> CODE</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5856"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p585code6"><pre class="code" style="font-family:monospace;">/system/classes/kohana/html.php</pre></td></tr></table></div>

<h3>Search for&#8230;</h3>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p585code7'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5857"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p585code7"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">return</span> <a href="http://www.php.net/htmlspecialchars"><span style="color: #990000;">htmlspecialchars</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>string<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$value</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_QUOTES</span><span style="color: #339933;">,</span> Kohana<span style="color: #339933;">::</span><span style="color: #000088;">$charset</span><span style="color: #339933;">,</span> <span style="color: #000088;">$double_encode</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>&#8230; and change it into</h3>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p585code8'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5858"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p585code8"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">return</span> <a href="http://www.php.net/htmlspecialchars"><span style="color: #990000;">htmlspecialchars</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>string<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$value</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_QUOTES</span><span style="color: #339933;">,</span> Kohana<span style="color: #339933;">::</span><span style="color: #000088;">$charset</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Done :)</p>
<fb:like href='http://www.andreas-glaser.com/2010/06/11/kohana-3-errorexception-warning-htmlspecialchars-expects-at-most-3-parameters-4-given/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2010/06/11/kohana-3-errorexception-warning-htmlspecialchars-expects-at-most-3-parameters-4-given/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kohana 3 &#8211; How to get current absolute and relative url</title>
		<link>http://www.andreas-glaser.com/2010/05/17/kohana-3-how-to-get-current-absolute-and-relative-url/</link>
		<comments>http://www.andreas-glaser.com/2010/05/17/kohana-3-how-to-get-current-absolute-and-relative-url/#comments</comments>
		<pubDate>Mon, 17 May 2010 09:10:22 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Kohana 3.x]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=553</guid>
		<description><![CDATA[?View Code PHP1 2 print URL::site&#40;Request::instance&#40;&#41;-&#62;uri&#40;&#41;, TRUE&#41;; // http://www.example.com/kohana/info/index print URL::site&#40;Request::instance&#40;&#41;-&#62;uri&#40;&#41;&#41;; // /kohana/info/index]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p553code10'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p55310"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p553code10"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">print</span> URL<span style="color: #339933;">::</span><span style="color: #004000;">site</span><span style="color: #009900;">&#40;</span>Request<span style="color: #339933;">::</span><span style="color: #004000;">instance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">uri</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// http://www.example.com/kohana/info/index</span>
<span style="color: #b1b100;">print</span> URL<span style="color: #339933;">::</span><span style="color: #004000;">site</span><span style="color: #009900;">&#40;</span>Request<span style="color: #339933;">::</span><span style="color: #004000;">instance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">uri</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// /kohana/info/index</span></pre></td></tr></table></div>

<fb:like href='http://www.andreas-glaser.com/2010/05/17/kohana-3-how-to-get-current-absolute-and-relative-url/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2010/05/17/kohana-3-how-to-get-current-absolute-and-relative-url/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Portfolio &#8211; Ajax/PHP Navigation Guide for renowned Clinic</title>
		<link>http://www.andreas-glaser.com/2008/11/04/portfolio-ajaxphp-navigation-guide-for-renowned-clinic/</link>
		<comments>http://www.andreas-glaser.com/2008/11/04/portfolio-ajaxphp-navigation-guide-for-renowned-clinic/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 14:52:38 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[My Portfolio]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Various]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=262</guid>
		<description><![CDATA[Navigation Guide written in JavaScript/Ajax/PHP My order was to develop a navigation guide which should help the visitors to discover the most important content of a website. This &#8220;NaviGuide&#8221; had to be realized as JavaScript/Ajax/CSS pop up on the fact that much users are using pop up blocker. This NaviGuide runs since 24.July 2008 at [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-263" title="portfolio" src="http://www.andreas-glaser.com/wp-content/uploads/2008/11/portfolio.png" alt="" width="463" height="69" /></p>
<p><strong>Navigation Guide written in JavaScript/Ajax/PHP</strong></p>
<p>My order was to develop a navigation guide which should help the visitors to discover the most important content of a website. This &#8220;NaviGuide&#8221; had to be realized as JavaScript/Ajax/CSS pop up on the fact that much users are using pop up blocker.</p>
<div class="ngg-galleryoverview" id="ngg-gallery-8-262">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://www.andreas-glaser.com/2008/11/04/portfolio-ajaxphp-navigation-guide-for-renowned-clinic/?show=slide">
			[Show as slideshow]		</a>
	</div>

	
	<!-- Thumbnails -->
		
	<div id="ngg-image-53" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/navuguide.png" title=" " class="shutterset_set_8" >
								<img title="navuguide.png" alt="navuguide.png" src="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/thumbs/thumbs_navuguide.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-54" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/naviguide.png" title=" " class="shutterset_set_8" >
								<img title="naviguide.png" alt="naviguide.png" src="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/thumbs/thumbs_naviguide.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-55" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/naviguide-004.png" title=" " class="shutterset_set_8" >
								<img title="naviguide-004.png" alt="naviguide-004.png" src="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/thumbs/thumbs_naviguide-004.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-56" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/naviguide-003.png" title=" " class="shutterset_set_8" >
								<img title="naviguide-003.png" alt="naviguide-003.png" src="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/thumbs/thumbs_naviguide-003.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-57" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/naviguide-002.png" title=" " class="shutterset_set_8" >
								<img title="naviguide-002.png" alt="naviguide-002.png" src="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/thumbs/thumbs_naviguide-002.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-58" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/naviguide-001.png" title=" " class="shutterset_set_8" >
								<img title="naviguide-001.png" alt="naviguide-001.png" src="http://www.andreas-glaser.com/wp-content/gallery/jazznaviguide/thumbs/thumbs_naviguide-001.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

<p>This NaviGuide runs since 24.July 2008 at <a title="http://www.stz-baden-baden.de" href="http://www.stz-baden-baden.de">www.stz-baden-baden.de</a> implemented in the well known Content Managment System &#8220;Joomla&#8221;.</p>
<fb:like href='http://www.andreas-glaser.com/2008/11/04/portfolio-ajaxphp-navigation-guide-for-renowned-clinic/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2008/11/04/portfolio-ajaxphp-navigation-guide-for-renowned-clinic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; count() vs. sizeOf()</title>
		<link>http://www.andreas-glaser.com/2008/08/19/php-count-vs-sizeof/</link>
		<comments>http://www.andreas-glaser.com/2008/08/19/php-count-vs-sizeof/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 08:51:57 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Benchmark]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Test]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=65</guid>
		<description><![CDATA[I was wondering whether there is a performance difference between count() and sizeof(). Test code: ?View Code PHP1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 [...]]]></description>
			<content:encoded><![CDATA[<p>I was wondering whether there is a performance difference between count() and sizeof().</p>
<p><strong>Test code:</strong></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p65code12'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6512"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
</pre></td><td class="code" id="p65code12"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?PHP
&nbsp;
  <span style="color: #666666; font-style: italic;">// CREATE TEST ARRAY</span>
  <span style="color: #000088;">$a</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'a'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'b'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'c'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'d'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'e'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'f'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'g'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'h'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'i'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'j'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// START TIMER ONE</span>
  <span style="color: #000088;">$TimerOne</span> <span style="color: #339933;">=</span> benchmarkTimerStart<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// CALL COUNT FUNCTION 1000000 TIMES</span>
  <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">1000000</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// STOP TIMER ONE</span>
  <span style="color: #000088;">$ResultOne</span> <span style="color: #339933;">=</span> benchmarkTimerStop<span style="color: #009900;">&#40;</span><span style="color: #000088;">$TimerOne</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// START TIMER TWO</span>
  <span style="color: #000088;">$TimerTwo</span> <span style="color: #339933;">=</span> benchmarkTimerStart<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// CALL SIZEOF FUNCTION 1000000 TIMES</span>
  <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">1000000</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <a href="http://www.php.net/sizeof"><span style="color: #990000;">sizeOf</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// STOP TIMER TWO</span>
  <span style="color: #000088;">$ResultTwo</span> <span style="color: #339933;">=</span> benchmarkTimerStop<span style="color: #009900;">&#40;</span><span style="color: #000088;">$TimerTwo</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// PRINT RESULTS</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Count: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$ResultOne</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' Seconds&amp;lt;br /&amp;gt;'</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'SizeOf: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$ResultTwo</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' Seconds'</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// TIMER FUNCTIONS</span>
  <span style="color: #000000; font-weight: bold;">function</span> benchmarkTimerStart<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$timeExplode</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/microtime"><span style="color: #990000;">microtime</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$time</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$timeExplode</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$timeExplode</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$time</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">function</span> benchmarkTimerStop<span style="color: #009900;">&#40;</span><span style="color: #000088;">$timer</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$timeExplode</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/microtime"><span style="color: #990000;">microtime</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$time</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$timeExplode</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$timeExplode</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$finish</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$time</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$timer</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$endTime</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/sprintf"><span style="color: #990000;">sprintf</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #009933; font-weight: bold;">%4.3f</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$finish</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$endTime</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>My test proved that there is <strong>no difference at all</strong>! sizeof() is just an alias for count().<br />
So I suggest you to use count() &#8211; its the original name of this function.</p>
<p><em><strong>So long,<br />
Andreas Glaser (aka JaZz)</strong></em></p>
<fb:like href='http://www.andreas-glaser.com/2008/08/19/php-count-vs-sizeof/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2008/08/19/php-count-vs-sizeof/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PHP Online-Zeit Zähler</title>
		<link>http://www.andreas-glaser.com/2008/06/10/php-online-zeit-zahler/</link>
		<comments>http://www.andreas-glaser.com/2008/06/10/php-online-zeit-zahler/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 13:41:41 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[Screenshot]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=32</guid>
		<description><![CDATA[Vor ein paar Tagen wurde ich zum wiederholten mal gefragt, wie man einen Counter in PHP entwickelt, welcher die Dauer des Aufenthalt eines Besuchers auf einer Website ermitteln kann. Der Ansatz Um einen Online-Zeit Zähler zu programmieren muss man entweder Cookies oder Session Variabeln verwenden. Zudem, da PHP Serverseitig läuft kann man niemals zu 100% [...]]]></description>
			<content:encoded><![CDATA[<p>Vor ein paar Tagen wurde ich zum wiederholten mal gefragt, wie man einen Counter in PHP entwickelt, welcher die Dauer des Aufenthalt eines Besuchers auf einer Website ermitteln kann.</p>
<p><strong>Der Ansatz</strong></p>
<p>Um einen Online-Zeit Zähler zu programmieren muss man entweder Cookies oder Session Variabeln verwenden. Zudem, da PHP Serverseitig läuft kann man niemals zu 100% genau sagen wie lange sich ein Benutzer auf der Website aufhält. Desweiteren muss man sich auf eine Genauigkeit festlegen (bsp.: 60 Sec).</p>
<p><strong>Der Code</strong></p>
<p><a href="http://www.andreas-glaser.com/wp-content/uploads/2008/06/screenshot-6_10_2008-3_36_22-pm.png"><img class="alignnone size-medium wp-image-31" title="screenshot-6_10_2008-3_36_22-pm" src="http://www.andreas-glaser.com/wp-content/uploads/2008/06/screenshot-6_10_2008-3_36_22-pm-300x183.png" alt="" width="300" height="183" /></a></p>
<p>Falls ihr Fragen dazu habt &#8211; einfach posten!</p>
<p><em><strong>Andreas Glaser</strong></em></p>
<fb:like href='http://www.andreas-glaser.com/2008/06/10/php-online-zeit-zahler/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2008/06/10/php-online-zeit-zahler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

