Is requiring PHP version 5.3 allowed in themes?


#1

Hi guys,

I was wondering, are we allowed to require PHP 5.3 version in our themes? Would very much like to use namespaces but sadly they are now supported by the PHP 5.2.x which WordPress lists as a minimum requirement.

Any info on the topic is appreciated.

Thanks


#2

Depends on WP version

WordPress server requirements for Version 3.2+:
PHP version 5.2.4 or greater.


#3

I’d like to kwow it as well since 5.2.x is long time dead and wp.org recommends 7.0


#4

5.6 as minimum but not 7.0, not at least now.


#5

7.0 is what wp.org recommends: https://wordpress.org/about/requirements/

i’m only interested in dropping compatibility with 5.2.X which reached end of life more than 6 years ago.
Code would work on 5.3.0 and above.


#6

No issues as far as Envato is concerned. You may receive a few complaints from customers still using 5.2, but they’re less than ever now (<10%).

Just do a version check first thing and quit gracefully with a message to prevent fatal errors / white page of death.


#7

It’s suggested but not all of the hosting providers updated the PHP version ( as default ) to 7
That’s why I suggested that you could use 5.6 as the minimum requirements


#8

What i’m really concerned here is being rejected by a reviewer with “wp runs on it so should your theme” kind of reason because that would require a major rewrite.


#9

It (at least) allowed in plugins. I saw many plugins with 5.3 requirements.


#10

I’m requiring PHP 5.4 in our themes with no problem. Autoloading FTW! I was afraid to do that at first, but I’ve had 0 complaints so far, so I’m guessing that hosting providers have finally abandoned PHP 5.2, and it’s active only on legacy servers now.