TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

PHP vs. Node.js: The REAL statistics

14 pointsby prahladyerialmost 11 years ago

10 comments

TimWollaalmost 11 years ago
&gt; PHP might be still having the “king of web” status, but with node.js in the town, I don’t see that status staying for very long!<p>I doubt that. PHP will stay because of Path dependency, most webhosters provide PHP, because software is written in PHP. Software is written in PHP, because it is most widely supported. I like node better, though.
评论 #7871614 未加载
daveslashalmost 11 years ago
<i>The truth is out. node.js was faster than PHP by more 14 times! These results are astonishing. It simply means that node.js IS going to be THE de-facto standard for writing performance driven apps in the upcoming future, there is no doubt about it!</i><p>While I enjoyed the benchmark test, I believe the conclusion that this is going to be de-facto as a result of it&#x27;s high performance is a bit premature. There are so many factors (both right and wrong) that contribute to the widespread adoption to a language&#x2F;framework&#x2F;technology, performance often being less important than you&#x27;d at first think.<p>EDIT: I&#x27;m not suggestion node will or will not be a de-facto. I&#x27;m suggesting that the factors contributing to a languages widespread adoption are varied and complex.
评论 #7871617 未加载
评论 #7871377 未加载
ksherlockalmost 11 years ago
It&#x27;s not really a node vs php comparison, it&#x27;s a node vs apache&#x2F;php&#x2F;unknown config comparison. HHVM can be 40-80 times faster than php for some benchmarks. Maybe try that?
评论 #7871197 未加载
评论 #7871604 未加载
tttyalmost 11 years ago
Some time ago at school the teacher asked to make a crawler so, as always I do it in node.js and mongodb. The site to crawl has around 80K pages and 300 records on each page. My script crawled and saved all that data (80K * 300) in less than 1 hour with around 100 concurrent requests. The other students that wrote in ruby, python and php took days to do the same thing. Also they had to do by parts because if they requested all by once their pc would crash because of memory.<p>Also I didn’t need any test because since the first time I ran node.js it was instant fast, not like php, ruby or python.
评论 #7871621 未加载
keithnoizualmost 11 years ago
If you&#x27;re really worried about performance just look at chicago boss or raw Yaws with Erlang and or Elixir.<p>The real question for most projects should be which is faster to develop with and has a better ecosystem.
hamburglaralmost 11 years ago
Wow, is this a parody? The lack of rockstar ninja references is confusing me.<p>&quot;Hey guys, I was wondering if node really is faster than PHP, so I checked. It is! End of story.&quot;
gexlaalmost 11 years ago
As long as there is software built in PHP which are used by huge numbers of people (Wordpress, Drupal, etc) then it will continue to be important to huge numbers of people.<p>For many of the people using these tools, the benchmarks don&#x27;t matter. Most people do okay with their Wordpress or Drupal sites. Application developers understand that the limitations of attempting to use a CMS as a platform and they have wide choices (not just PHP or Node.)
codygmanalmost 11 years ago
Just for fun, here&#x27;s an unoptimized and un-async&#x27;d haskell version I threw together:<p><a href="http://lpaste.net/105557" rel="nofollow">http:&#x2F;&#x2F;lpaste.net&#x2F;105557</a><p>It takes about a second. I expected it to be faster than node and php, but it being this much faster makes me think I got something wrong. The files generated aren&#x27;t all the same.
pmelnichukalmost 11 years ago
The really approximated excluding concrete version information and using only read and write to disk commands statistics*<p>Personally i prefer <a href="http://www.techempower.com/benchmarks/" rel="nofollow">http:&#x2F;&#x2F;www.techempower.com&#x2F;benchmarks&#x2F;</a> reply if anyone knows something better than that one
Bostwickalmost 11 years ago
I&#x27;d like to see the author make an attempt with the React library [1] in PHP as well. You don&#x27;t have to abandon your language of choice to gain the ability to do asynchronous I&#x2F;O.<p>[1] <a href="http://reactphp.org/" rel="nofollow">http:&#x2F;&#x2F;reactphp.org&#x2F;</a>