PHP 的性能有多好? [英] How good is PHP performance?

查看:43
本文介绍了PHP 的性能有多好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我最近看到的一篇帖子的后续文章,该帖子表明 PHP 性能很差:

This is a follow up to a recent post I've seen which suggests that PHP performance is poor:

PHP.始终是.瓶颈.我的服务器群,让我向您展示它们!PHP 整体性能"

"PHP. IS. ALWAYS. THE. BOTTLENECK. My server farms, let me show you them! PHP Overall Performance"

紧随其后:

PHP 性能太糟糕了糟糕.这是基于我使用 OpenX(在 Linux 上)和 WordPress(在 win64 上)的经验."

"PHP performance is frickin' abysmal. I am basing this on my experience with OpenX (on Linux) and WordPress (on win64)."

我们能否得到一些关于 PHP 性能好坏的客观社区意见...

Can we get some objective community input as to whether PHP performance is good, or bad ...

  1. 与其他语言/运行时相比
  2. 从语言的角度来看,有没有比其他库或操作更好或更差的特定库或操作?
  3. 从构建的角度来看,有没有比其他版本更好或更差的版本或平台?

推荐答案

PHP 性能有多好?"的答案是足够好".

The answer to "How good is PHP performance?" is "Good enough".

我的意思是,网站的大多数性能问题都与其他问题有关,例如糟糕的数据库设计、几乎没有缓存、CSS/JavaScript/图像缓存等.

By that I mean that most performance issues with Websites are related to other issues like poor database design, little to no caching, CSS/JavaScript/image caching and so on.

PHP 被 Internet 上的一些最大的站点使用,因此它通过了该测试.Jeff Atwood 认为 PHP 很烂,但没关系.有一些事情可以正确地批评 PHP(例如,不一致的参数顺序、不一致的函数命名、魔术引号等),但我认为他夸大了负面.

PHP is used by some of the largest sites on the Internet so it's passed that test. Jeff Atwood argues PHP Sucks, But It Doesn't Matter. There are things to rightly criticize PHP about (e.g., inconsistent parameter order, inconsistent function naming, magic quotes, etc) but I think he's overstating the negative.

所以不要根据假设的性能选择(或不选择)PHP,因为它无关紧要(与其他一切相比).

So don't choose PHP (or not) based on supposed performance because it doesn't matter (compared to everything else).

这篇关于PHP 的性能有多好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆