Poll

According to w3techs, PHP 5.2+ has a 98.1% market share, and PHP 5.3+ has 63.7%. Which should be the minimal version Wedge can run on?

5.2 -- my host only offers that, pretty please.
2 (9.1%)
5.3 -- using anonymous functions, namespaces or other things should be done ASAP. Wedge is here to stay.
10 (45.5%)
5.4 -- who cares that it's only used by 11%?! I want array shortcuts! And I want to be the only one to use Wedge anyway!
10 (45.5%)
I don't know what my server is running, and/or I have no idea how to have PHP upgrade, and/or am unsure for now.
0 (0%)
Total Members Voted: 22

MrCat

  • Posts: 14
Re: Minimum PHP version?
« Reply #45, on February 3rd, 2014, 07:34 PM »
Just got in touch with my host and this is what they said:
"Thank you for contacting us! We're able to install 5.3.21 PHP version for anyone of your domains. Just let us know domain names and we'll be glad to proceed with that."

It's not default and has to be enabled? Just for specific domains? Is this odd?

How was I supposed to know that...

MultiformeIngegno

  • Posts: 1,337
Re: Minimum PHP version?
« Reply #46, on February 3rd, 2014, 07:41 PM »
hosts can have different environments.. they can have a check or a list that says X hostings are on php A, others on B..

MrCat

  • Posts: 14
Re: Minimum PHP version?
« Reply #47, on February 3rd, 2014, 09:13 PM »
Thanks MultiformeIngegno, I wasn't aware of that.
I guess some customers don't want to automatically upgrade because their sites might break.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Minimum PHP version?
« Reply #48, on February 3rd, 2014, 11:47 PM »
(Then it leaves us with only TE in the PHP < 5.3 list..? Thorsten, can you elaborate..?)

That's the thing with PHP: some (not all!) changes may be backwards-incompatible. For instance, SMF 2.0.7 is a (pretty underwhelming) patch to mostly improve PHP 5.5 support because the 'e' modifier in PCRE was deprecated, and SMF relied heavily on that. Wedge was patched to the same effect about six months ago (by the same person, I suspect :P). Without these patches, the software would still work, but you'd be getting warnings all over your page. Not cool.

Unfortunately, the reverse is also true... If you try using new PHP features, older versions will give you errors (which isn't a problem for Wedge, except *before* the install process begins, as I painfully noticed today.)

So, basically, whenever you're using software that hasn't been updated in a while (they don't always need to), you're better off staying on your current PHP. All hosts use different ways of allowing users to upgrade; some will force it on them (good luck for old software), and I'm fine with that but I understand it'd be upsetting for those. Some will provide a setting in their panel to choose your default PHP. And some will only enable it if you contact their support team.

So, no worries, it's all good.
That's the whole idea. Wedge forces users to upgrade their PHP to newer, safer versions. If you can update to PHP 5.5, then be my guest. I do all of my local testing on PHP 5.5 these days, so Wedge is fully compatible between PHP 5.3 and 5.5. (5.6 alpha was released recently, and it doesn't break any compatibility in Wedge, so you can add that to the list.)