<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How does PHP echo&#8217;s a &#8220;Hello World&#8221;? &#8211; Behind the scene</title>
	<atom:link href="http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/feed/" rel="self" type="application/rss+xml" />
	<link>http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/</link>
	<description>PHP, Memcached, XMPP and Web Development</description>
	<lastBuildDate>Thu, 18 Mar 2010 08:59:29 +0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: MySQL Query Cache, WP-Cache, APC, Memcache - What to choose &#171; Abhi&#8217;s Weblog</title>
		<link>http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/comment-page-1/#comment-562</link>
		<dc:creator>MySQL Query Cache, WP-Cache, APC, Memcache - What to choose &#171; Abhi&#8217;s Weblog</dc:creator>
		<pubDate>Wed, 14 Jan 2009 18:19:04 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/#comment-562</guid>
		<description>[...] - An opcode based cache for PHP APC stands for Alternative PHP Cache. In one of my previous post How does PHP echo’s a “Hello World”? - Behind the scene, I talk about how PHP churns out &#8220;Hello World&#8221; for [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8211; An opcode based cache for PHP APC stands for Alternative PHP Cache. In one of my previous post How does PHP echo’s a “Hello World”? &#8211; Behind the scene, I talk about how PHP churns out &#8220;Hello World&#8221; for [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHP Extensions - How and Why? &#124; Abhi's Weblog</title>
		<link>http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/comment-page-1/#comment-427</link>
		<dc:creator>PHP Extensions - How and Why? &#124; Abhi's Weblog</dc:creator>
		<pubDate>Tue, 09 Dec 2008 15:14:17 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/#comment-427</guid>
		<description>[...] understand what we are going to disucss, I will recommend you to read one of  my previous post How does PHP echo’s a “Hello World”? - Behind the scene . In this post I discussed in brief the backend architecture of [...]</description>
		<content:encoded><![CDATA[<p>[...] understand what we are going to disucss, I will recommend you to read one of  my previous post How does PHP echo’s a “Hello World”? &#8211; Behind the scene . In this post I discussed in brief the backend architecture of [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/comment-page-1/#comment-426</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sat, 29 Nov 2008 09:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/#comment-426</guid>
		<description>@Rohit
Yes i must say PHP is a lot easy to start with. And you can build serious sites faster in PHP than in any other language.

But now that I am going through a lot of Python and analyzing the performance, I can find that Python provides a better scalable site.

One guy had a 7GB text file that he needed to run some parsing on (to prepare for a DB import). Performance Numbers (on 5 million lines worth of the file)

$ time ./split.pl  p.test (# Perl 5.8.8)
  real    0m38.577s
  user    0m33.554s
  sys     0m0.848s

$ time ./split.py p.test (# Python 2.4.4)
  real    0m44.895s
  user    0m42.975s
  sys     0m0.900s

$ time php split.php p.test (# PHP 5.2.6RC4)
  real    1m10.887s
  user    0m51.251s
  sys     0m18.677s

which shows PHP is about 50% slower as compared to Perl and Python. Perl is fastest but then Perl is not suitable for web development stuffs.</description>
		<content:encoded><![CDATA[<p>@Rohit<br />
Yes i must say PHP is a lot easy to start with. And you can build serious sites faster in PHP than in any other language.</p>
<p>But now that I am going through a lot of Python and analyzing the performance, I can find that Python provides a better scalable site.</p>
<p>One guy had a 7GB text file that he needed to run some parsing on (to prepare for a DB import). Performance Numbers (on 5 million lines worth of the file)</p>
<p>$ time ./split.pl  p.test (# Perl 5.8.8)<br />
  real    0m38.577s<br />
  user    0m33.554s<br />
  sys     0m0.848s</p>
<p>$ time ./split.py p.test (# Python 2.4.4)<br />
  real    0m44.895s<br />
  user    0m42.975s<br />
  sys     0m0.900s</p>
<p>$ time php split.php p.test (# PHP 5.2.6RC4)<br />
  real    1m10.887s<br />
  user    0m51.251s<br />
  sys     0m18.677s</p>
<p>which shows PHP is about 50% slower as compared to Perl and Python. Perl is fastest but then Perl is not suitable for web development stuffs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/comment-page-1/#comment-425</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sat, 29 Nov 2008 08:56:16 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/#comment-425</guid>
		<description>@Piccolo Principe
What sort of infinite loop are you talking about? Is it a simple while(1) {} thing that you are referring to?

Well I am not sure where did you encountered segmentation fault? Can you give an example of a script you are referring? Once I got an segmentation fault but it wasn&#039;t because of a bad script.</description>
		<content:encoded><![CDATA[<p>@Piccolo Principe<br />
What sort of infinite loop are you talking about? Is it a simple while(1) {} thing that you are referring to?</p>
<p>Well I am not sure where did you encountered segmentation fault? Can you give an example of a script you are referring? Once I got an segmentation fault but it wasn&#8217;t because of a bad script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rohit Nair</title>
		<link>http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/comment-page-1/#comment-424</link>
		<dc:creator>Rohit Nair</dc:creator>
		<pubDate>Sat, 29 Nov 2008 08:46:59 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/#comment-424</guid>
		<description>Interesting stuff. I guess because PHP is so easy as a language and you have this feeling that &quot;it just works&quot;, you tend to overlook its internals and unless you know that, you obviously can&#039;t write efficient PHP.</description>
		<content:encoded><![CDATA[<p>Interesting stuff. I guess because PHP is so easy as a language and you have this feeling that &#8220;it just works&#8221;, you tend to overlook its internals and unless you know that, you obviously can&#8217;t write efficient PHP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piccolo Principe</title>
		<link>http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/comment-page-1/#comment-423</link>
		<dc:creator>Piccolo Principe</dc:creator>
		<pubDate>Fri, 28 Nov 2008 16:10:43 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/#comment-423</guid>
		<description>I have seen the case where bad written scripts (infinite recursion) cause php to segfault. What happen in this case? What initialization is repeated?</description>
		<content:encoded><![CDATA[<p>I have seen the case where bad written scripts (infinite recursion) cause php to segfault. What happen in this case? What initialization is repeated?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikhil Aggarwala</title>
		<link>http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/comment-page-1/#comment-422</link>
		<dc:creator>Nikhil Aggarwala</dc:creator>
		<pubDate>Thu, 27 Nov 2008 11:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/#comment-422</guid>
		<description>Super post. I expect a post on how to write a PHP extension, if you can. I have searched a lot on web and found a lot of so called Hello World PHP extension code. But unfortunately none of them clearly explains each and every piece of that code.

From this post I guess you have dealt with PHP extensions and it would be nice if you can share the same with us.

@JD001
I am sure that PHP developers must have thought about loading of extensions and surely they must have made it a light weight process. I am sure it won&#039;t effect your site performance.</description>
		<content:encoded><![CDATA[<p>Super post. I expect a post on how to write a PHP extension, if you can. I have searched a lot on web and found a lot of so called Hello World PHP extension code. But unfortunately none of them clearly explains each and every piece of that code.</p>
<p>From this post I guess you have dealt with PHP extensions and it would be nice if you can share the same with us.</p>
<p>@JD001<br />
I am sure that PHP developers must have thought about loading of extensions and surely they must have made it a light weight process. I am sure it won&#8217;t effect your site performance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JD001</title>
		<link>http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/comment-page-1/#comment-421</link>
		<dc:creator>JD001</dc:creator>
		<pubDate>Thu, 27 Nov 2008 11:47:20 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/#comment-421</guid>
		<description>Same as Jaisen, I have now concerns over the performance of PHP since its calling RINIT module of each and every extension whether required or not.

However thanks for sharing this useful information with us all.</description>
		<content:encoded><![CDATA[<p>Same as Jaisen, I have now concerns over the performance of PHP since its calling RINIT module of each and every extension whether required or not.</p>
<p>However thanks for sharing this useful information with us all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vitor Almeida da Silva</title>
		<link>http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/comment-page-1/#comment-420</link>
		<dc:creator>Vitor Almeida da Silva</dc:creator>
		<pubDate>Thu, 27 Nov 2008 11:41:15 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/#comment-420</guid>
		<description>Interesting post. Thanks for sharing these.</description>
		<content:encoded><![CDATA[<p>Interesting post. Thanks for sharing these.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/comment-page-1/#comment-419</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 27 Nov 2008 10:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/2008/11/how-does-php-echos-a-hello-world-behind-the-scene/#comment-419</guid>
		<description>You got it wrong actually. MINIT is called for each module once only when you start your yapache server. After that only RINIT method is called for each module upon every subsequent page request.

RINIT generally involve populating variables e.g. in case of $_SESSION variables, which really doesn&#039;t cost much. Even if you are not using it, it will be unset() upon module RSHUTDOWN method call.

However its always a better practice to keep an eye on what modules PHP loads by default and what not. In case of high traffic websites that might enhance the performance. (Though I have no stats to show how much enhancement in performance)

Note: Step 1 of startup and Step 2 of shutdown, happens when you start and stop SAPI. Step 2 of startup and Step 1 of shutdown happens when a page is requested.</description>
		<content:encoded><![CDATA[<p>You got it wrong actually. MINIT is called for each module once only when you start your yapache server. After that only RINIT method is called for each module upon every subsequent page request.</p>
<p>RINIT generally involve populating variables e.g. in case of $_SESSION variables, which really doesn&#8217;t cost much. Even if you are not using it, it will be unset() upon module RSHUTDOWN method call.</p>
<p>However its always a better practice to keep an eye on what modules PHP loads by default and what not. In case of high traffic websites that might enhance the performance. (Though I have no stats to show how much enhancement in performance)</p>
<p>Note: Step 1 of startup and Step 2 of shutdown, happens when you start and stop SAPI. Step 2 of startup and Step 1 of shutdown happens when a page is requested.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
