哪个版本的PHP被视为“标准"版本?对于大多数虚拟主机? [英] What version of PHP is considered "Standard" for most web hosts?

查看:115
本文介绍了哪个版本的PHP被视为“标准"版本?对于大多数虚拟主机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的开发箱运行5.3.x时,我得知许多托管站点仅支持5.1.6令我感到惊讶.这真是令人失望,因为我一直在使用命名空间(5.3+)和其他功能,即使不是绝对必要的,这些功能在我看来也非常出色.

I have been surprised to learning that a number of my hosted sites only support 5.1.6, when my dev box is running 5.3.x. This is a huge disappointment, because I've been working with namespaces (5.3+) and other features that seem to me to be excellent, if not strictly necessary.

无论如何,在编写旨在实现可移植性的代码(例如,用于诸如WordPress之类的流行平台的插件)时,应根据大多数Web主机所支持的最低版本来定位PHP的哪个版本.

Anyway, when writing code that is designed to be portable (eg: plugins for popular platforms like WordPress), what version of PHP should I be targeting, based on the minimum version that's supported on the majority of web hosts out there.

有人知道吗?如何找到?

Does anyone know? How can one find out?

推荐答案

检查 它包含许多PHP统计信息. 截至2012年12月12日

It contains a lot of PHP stats. As of 12 Dec 2012,

    所有使用PHP的网站96.4%使用
  • 版本5.
  • 所有使用PHP 5版的网站42.3%使用
  • 5.3版
  • 所有使用PHP 5版的网站52.8%使用
  • 5.2版
  • Version 5 is used by 96.4% of all the websites which use PHP.
  • Version 5.3 is used by 42.3% of all the websites which use PHP version 5
  • Version 5.2 is used by 52.8% of all the websites which use PHP version 5

这篇关于哪个版本的PHP被视为“标准"版本?对于大多数虚拟主机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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