I don’t expect a very big discution on this but anyways if you have to add some arguments, then you can explain your response.
Treat this topic as a poll.
The question: What is the minimum PHP version that your themes or plugins require and why(optionally)?WordPress itself requires PHP 5.2.4+, but you may already know that this version is very old and the PHP community added a lot more to the current versions.
- PHP 5.3 added anonymous functions, late state binding, namespaces, etc.
- PHP 5.4 added short array syntax, short php tags always available(no more problems on that), direct class member access or direct array acces from function, etc.
- 5.3 – http://php.net/manual/en/migration53.new-features.php
- 5.4 – http://php.net/manual/en/migration54.new-features.php
Here is a poll, please add your vote: http://poll.fm/4xf4s
Edit: A moderator please change the title to the question itself. Thank you.
Come on, guys. Please vote, share, whatever.
5.3 is a bit like Internet Explorer v6 (to me) though plenty still use it. Time to move on since v5.6 is now out. I voted for v5.4 since I couldn’t think of a good reason not to. Plenty of bad reasons.
For as long as the WordPress requires PHP 5.2.4, plugins need to work with that PHP too. And there are still a lot of servers running PHP 5.2. New servers usually have a choice of PHP 5.3 or 5.4, and very few have 5.5. I always create my plugins to support PHP 5.2.4.
WordPress.org own statistics information shows that 38.3% of all servers work on PHP 5.2, 38.7% use PHP 5.3 and 20.5% use PHP 5.4 with only 2.3% use PHP 5.5.
It would be great if we can use only the latest PHP, but that is not realistic, as many users can’t choose which PHP they can run on their server.
Voted 5.3+ because 5.2 is beyond obsolete and should be ditched. Also, coming from a background of development where I normally use “stronger” programming languages, I tend to design solutions using techniques such as late static binding, namespaces and a couple of other features, which are all standard almost everywhere else. I would even use overrides, if they were available.
Regarding compatibility issues, just two of our clients (we have over a thousand) were with hosting providers who didn’t want to, or know how to upgrade to 5.3 or higher. Of those two, only one could not get the server upgraded, while the other got it within a day. The die was cast, and 5.3+ has been ever since.