<?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: Rumors of PHP&#8217;s death greatly exaggerated</title>
	<atom:link href="http://www.alimadzi.com/2006/09/18/rumors-of-phps-death-greatly-exaggerated/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alimadzi.com/2006/09/18/rumors-of-phps-death-greatly-exaggerated/</link>
	<description>Web development, new media, open source, and more</description>
	<lastBuildDate>Fri, 06 Mar 2009 19:37:12 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Harro!</title>
		<link>http://www.alimadzi.com/2006/09/18/rumors-of-phps-death-greatly-exaggerated/comment-page-1/#comment-2693</link>
		<dc:creator>Harro!</dc:creator>
		<pubDate>Fri, 15 Jun 2007 16:00:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.alimadzi.com/2006/09/18/rumors-of-phps-death-greatly-exaggerated/#comment-2693</guid>
		<description>Ha ha ha ha..... There are many things that drive a technology, and that is requirements, and ease of use.

If a solution can be put together quickly in PHP, then its the language of choice.</description>
		<content:encoded><![CDATA[<p>Ha ha ha ha&#8230;.. There are many things that drive a technology, and that is requirements, and ease of use.</p>
<p>If a solution can be put together quickly in PHP, then its the language of choice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHP ain't got no respect : Alimadzi - by Patrick Lee</title>
		<link>http://www.alimadzi.com/2006/09/18/rumors-of-phps-death-greatly-exaggerated/comment-page-1/#comment-2594</link>
		<dc:creator>PHP ain't got no respect : Alimadzi - by Patrick Lee</dc:creator>
		<pubDate>Sat, 09 Jun 2007 03:39:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.alimadzi.com/2006/09/18/rumors-of-phps-death-greatly-exaggerated/#comment-2594</guid>
		<description>[...] also written about the silliness of predictions of PHP&#8217;s imminent downfall. PHP is not without its warts, but it also supports a vibrant ecosystem of frameworks (Zend [...]</description>
		<content:encoded><![CDATA[<div style="">
<p>[...] also written about the silliness of predictions of PHP&#8217;s imminent downfall. PHP is not without its warts, but it also supports a vibrant ecosystem of frameworks (Zend [...]</p>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: General Baggz</title>
		<link>http://www.alimadzi.com/2006/09/18/rumors-of-phps-death-greatly-exaggerated/comment-page-1/#comment-162</link>
		<dc:creator>General Baggz</dc:creator>
		<pubDate>Wed, 20 Sep 2006 19:29:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.alimadzi.com/2006/09/18/rumors-of-phps-death-greatly-exaggerated/#comment-162</guid>
		<description>I see a lot wrong with the &quot;PHP is Doomed&quot; article.  The author of the article failed to accept the fact the PHP is a web scripting language built and accepted among users to handle that task.  Where as I can see the need for multi-threading on desktop and server applications that are built for performance, a web application is just that... a web application.

First of all, multi-threading is used to perform one task while you are doing another concurrently in parallel, such as loading one section of your application while the user is viewing another.  Or Pulling live data from a third party to update content within your application with no apparent delay to the end user.  These are just a couple examples.

Ok, now lets look at the concept of a web site.  A user loads up the home page of a website, then has several options (links) of what to do next.  When the user clicks on a link, then another web page loads up... then the next.  Bandwidth is a commodity just like anything else, and we don&#039;t want to burn unnecessary bandwidth just because we can... so we don&#039;t.  Anyway, if we wanted to &quot;thread&quot; the rest of the pages, it would have to be a joint effort on the client and the server because if we just did it on the server, it would be of no use to the client.  So we could virtually &quot;thread&quot; it with AJAX.  I know, this is a major part of the debate, so bare with me.

Alright, for the pulling of live data, in order to do so with the server side scripting language, we would have to hold the page in limbo (a little loading bar at the bottom of the screen indefinitely) and continually push chunks of data to the client.  As they are pushed to the client, they will be forced to the bottom of the document, so you will have to use JavaScript to force the chunks of data where they need to go.  There is one problem with that though... the onload function never fires because we&#039;re holding the page in limbo to compensate for the threading.  Again, AJAX technology is clearly a better choice for updating third party data.

Now on to one of the main arguments of the document... multi-core processors/SMP servers.  Yes, multi-core processors are cool, and yes it is true that PHP can&#039;t take advantage of them by using multiple threads for various tasks while it is running... Or can they?

PHP scripts just sit there until a user tells it that it&#039;s time to be interpreted.  The Apache webserver runs under such a user that can tell the PHP scripts to be interpreted, and also tell them which core/processor to run on.  Yes, the Apache web server supports SMP, so indirectly, PHP can take advantage of multi-core/SMP systems (How and why is beyond the scope of this comment).

Now to my last point.  The author mentioned something about pulling database queries and then running other code in another thread to build a table or something.  I see this as very trivial optimization, and I see the performance gain vs. time spent on programming it (not to mention the amount spent for the programmer) as being so minuscule that it wouldn&#039;t be worth it.

Ok, so you would gain maybe a couple hundred extra pages per million (*assuming you programmed it correctly and your optimizations really worked), but if you really need the extra performance, then it means you are making money and could just throw a couple extra servers at it behind a load balancer using a couple databases utilizing replication.  The amount speant on the extra servers... about 4 - 8 grand (depending on how beefy the servers are),  and an extra 3 grand or so per year for bandwidth (assuming you need it).

Weigh that in with the hiring of a programmer who beats on his chest because he&#039;s a master at programming in a multi-threaded JDK/Tomcat environment and requires Java Enterprise Edition to be efficient... up to 20k per year..... And, to top it off, you&#039;re still going to need the few extra servers behind a load balancer and a couple of Oracle servers utilizing replication (12-18 grand).

So it boils down to this... 3k per year   8k investment... 20k per year   18k investment.  I&#039;ll take the 3k   8k every time.


* Multi-Threaded
1. Pull the query O(n) where n is the number of rows.
2. Build the table O(n)
3. Populate the table O(n) Assuming you have an efficient search and replace algorithm.

    1 and 2 happen in parallel so we end up with
    = 2 * O(n) (assuming an efficient search/replace algorithm)

* Sequential
1. Pull the query O(n) rows
2. Build the table at the same time as pulling the rows (Accounted for in the first O(n).

    = 1 * O(n).

As we know from algorithms, the constant before the O can be omitted, so the run time is essentially the same, but as we can see, you save time from just building the row while you pull the data.  Again, it&#039;s a flawed point by the author (it was in a comment), even though I can see where it would be beneficial, just not in the case that he mentioned.</description>
		<content:encoded><![CDATA[<p>I see a lot wrong with the &#8220;PHP is Doomed&#8221; article.  The author of the article failed to accept the fact the PHP is a web scripting language built and accepted among users to handle that task.  Where as I can see the need for multi-threading on desktop and server applications that are built for performance, a web application is just that&#8230; a web application.</p>
<p>First of all, multi-threading is used to perform one task while you are doing another concurrently in parallel, such as loading one section of your application while the user is viewing another.  Or Pulling live data from a third party to update content within your application with no apparent delay to the end user.  These are just a couple examples.</p>
<p>Ok, now lets look at the concept of a web site.  A user loads up the home page of a website, then has several options (links) of what to do next.  When the user clicks on a link, then another web page loads up&#8230; then the next.  Bandwidth is a commodity just like anything else, and we don&#8217;t want to burn unnecessary bandwidth just because we can&#8230; so we don&#8217;t.  Anyway, if we wanted to &#8220;thread&#8221; the rest of the pages, it would have to be a joint effort on the client and the server because if we just did it on the server, it would be of no use to the client.  So we could virtually &#8220;thread&#8221; it with AJAX.  I know, this is a major part of the debate, so bare with me.</p>
<p>Alright, for the pulling of live data, in order to do so with the server side scripting language, we would have to hold the page in limbo (a little loading bar at the bottom of the screen indefinitely) and continually push chunks of data to the client.  As they are pushed to the client, they will be forced to the bottom of the document, so you will have to use JavaScript to force the chunks of data where they need to go.  There is one problem with that though&#8230; the onload function never fires because we&#8217;re holding the page in limbo to compensate for the threading.  Again, AJAX technology is clearly a better choice for updating third party data.</p>
<p>Now on to one of the main arguments of the document&#8230; multi-core processors/SMP servers.  Yes, multi-core processors are cool, and yes it is true that PHP can&#8217;t take advantage of them by using multiple threads for various tasks while it is running&#8230; Or can they?</p>
<p>PHP scripts just sit there until a user tells it that it&#8217;s time to be interpreted.  The Apache webserver runs under such a user that can tell the PHP scripts to be interpreted, and also tell them which core/processor to run on.  Yes, the Apache web server supports SMP, so indirectly, PHP can take advantage of multi-core/SMP systems (How and why is beyond the scope of this comment).</p>
<p>Now to my last point.  The author mentioned something about pulling database queries and then running other code in another thread to build a table or something.  I see this as very trivial optimization, and I see the performance gain vs. time spent on programming it (not to mention the amount spent for the programmer) as being so minuscule that it wouldn&#8217;t be worth it.</p>
<p>Ok, so you would gain maybe a couple hundred extra pages per million (*assuming you programmed it correctly and your optimizations really worked), but if you really need the extra performance, then it means you are making money and could just throw a couple extra servers at it behind a load balancer using a couple databases utilizing replication.  The amount speant on the extra servers&#8230; about 4 &#8211; 8 grand (depending on how beefy the servers are),  and an extra 3 grand or so per year for bandwidth (assuming you need it).</p>
<p>Weigh that in with the hiring of a programmer who beats on his chest because he&#8217;s a master at programming in a multi-threaded JDK/Tomcat environment and requires Java Enterprise Edition to be efficient&#8230; up to 20k per year&#8230;.. And, to top it off, you&#8217;re still going to need the few extra servers behind a load balancer and a couple of Oracle servers utilizing replication (12-18 grand).</p>
<p>So it boils down to this&#8230; 3k per year   8k investment&#8230; 20k per year   18k investment.  I&#8217;ll take the 3k   8k every time.</p>
<p>* Multi-Threaded<br />
1. Pull the query O(n) where n is the number of rows.<br />
2. Build the table O(n)<br />
3. Populate the table O(n) Assuming you have an efficient search and replace algorithm.</p>
<p>    1 and 2 happen in parallel so we end up with<br />
    = 2 * O(n) (assuming an efficient search/replace algorithm)</p>
<p>* Sequential<br />
1. Pull the query O(n) rows<br />
2. Build the table at the same time as pulling the rows (Accounted for in the first O(n).</p>
<p>    = 1 * O(n).</p>
<p>As we know from algorithms, the constant before the O can be omitted, so the run time is essentially the same, but as we can see, you save time from just building the row while you pull the data.  Again, it&#8217;s a flawed point by the author (it was in a comment), even though I can see where it would be beneficial, just not in the case that he mentioned.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher</title>
		<link>http://www.alimadzi.com/2006/09/18/rumors-of-phps-death-greatly-exaggerated/comment-page-1/#comment-160</link>
		<dc:creator>Christopher</dc:creator>
		<pubDate>Mon, 18 Sep 2006 21:13:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.alimadzi.com/2006/09/18/rumors-of-phps-death-greatly-exaggerated/#comment-160</guid>
		<description>Call me when it&#039;s required that I KNOW Ruby or Python for my job. 

The way I see things is this:  So what if something might be better or faster.  Currently we&#039;re not seeing bottlenecks in our software where we would need to go somewhere else to optimize the software.  When that becomes a problem, it will be told to us that we need to either optimize our code, or look into something else to program.  I dont see that happening anytime soon though.

A key problem with this guy&#039;s thoughts is that Perl went away in favor of PHP.  That only happened because web development using perl wasnt the best way to do things.  PHP is meant for the web whereas perl is not.  People used perl because we didnt have PHP &#039;way back when&#039;.  

Things evolve.  Who&#039;s to say that PHP WONT be able to multithread?

I doubt PHP will ever &#039;die&#039; unless zend decides to kill it off in favor of something else.

Ramble ramble ramble.  Gotta get back to work ;)</description>
		<content:encoded><![CDATA[<p>Call me when it&#8217;s required that I KNOW Ruby or Python for my job. </p>
<p>The way I see things is this:  So what if something might be better or faster.  Currently we&#8217;re not seeing bottlenecks in our software where we would need to go somewhere else to optimize the software.  When that becomes a problem, it will be told to us that we need to either optimize our code, or look into something else to program.  I dont see that happening anytime soon though.</p>
<p>A key problem with this guy&#8217;s thoughts is that Perl went away in favor of PHP.  That only happened because web development using perl wasnt the best way to do things.  PHP is meant for the web whereas perl is not.  People used perl because we didnt have PHP &#8216;way back when&#8217;.  </p>
<p>Things evolve.  Who&#8217;s to say that PHP WONT be able to multithread?</p>
<p>I doubt PHP will ever &#8216;die&#8217; unless zend decides to kill it off in favor of something else.</p>
<p>Ramble ramble ramble.  Gotta get back to work <img src='http://www.alimadzi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
