Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What version of PHP is considered "Standard" for most web hosts? [closed]

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.

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?

like image 887
Tom Auger Avatar asked Dec 27 '22 19:12

Tom Auger


2 Answers

Check http://w3techs.com/technologies/details/pl-php/all/all out.

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

  • 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
like image 182
Anirudh Ramanathan Avatar answered Jan 14 '23 15:01

Anirudh Ramanathan


My godaddy hosting account is on 5.2.17. If you want code to be portable then I would go with a general baseline of 5.0 features, which is pretty big feature set.

like image 27
Grady Player Avatar answered Jan 14 '23 15:01

Grady Player