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

Nao

  • Dadman with a boy
  • Posts: 16,082
Minimum PHP version?
« on December 21st, 2013, 02:20 PM »
I figured I could ask that.

I've often met situations where I wanted to turn silly create_function() calls into closures, but this morning -- more frustration for me. I figured I could rewrite the cache handler to basically link cache_get_data and cache_put_data together by putting the regeneration code into a closure, which would then allow me to easily benchmark regeneration times, instead of just cache storage times.

So, this just means-- "I'd really like to use PHP 5.3 in Wedge."
But then, it also means that a third of all servers won't be able to install Wedge. IIRC, Wedge.org runs on PHP 5.5 or something, and my Wampserver has PHP 5.3, so it's not a problem for me, and generally speaking I think that the '5.2 third' portion is likely to be a portion of servers that have either been abandoned, or just not maintained very often, and thus more likely to cause configuration problems when using Wedge.

In short:
- 5.2 is the current version required by Wedge. PHP 5.2 is great.
- 5.3 is a bit better, not THAT much better, but I've been wanting to do closures for years, just like I'm doing in JavaScript. Going for PHP 5.3 won't make my life much easier, and won't make Wedge better. But still, I'd like to look into it.

The competition usually has a required PHP version < 5.3: xenForo has 5.2 IIRC, SMF has something like 4.0 (lulz, but they're trying to account for website upgrades, while I'm betting on website importing), even newer software like esoTalk only requires 'PHP 5'. Vanilla, I think has a requirement of 5.1. The only 'popular' PHP package I know of that requires PHP 5.3 is Laravel, and it's a framework, not a forum package. So, both logic and statistics tell me to keep using 5.2, although maybe, well... Maybe it's okay, hence this poll.

Remember, Wedge is striving to remain compatible with as many browsers as possible; but when it comes to the server behind it, this is usually something that most serious webmasters CAN control, and personally, I like being in charge!

Norodo

  • Oh you Baidu, so randumb. (60 sites being indexed at once? Jeez)
  • Posts: 469
Re: Minimum PHP version?
« Reply #1, on December 21st, 2013, 02:37 PM »
My sole host (Nearlyfreespeech) supports anything up to 5.5.

I don't really care what you choose here. Do what makes your job easier.

kimikelku

  • Posts: 61
Re: Minimum PHP version?
« Reply #2, on December 21st, 2013, 03:34 PM »
Alot of code from smf to run on old configurations was removed right?
Why not do the same for php?

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Minimum PHP version?
« Reply #3, on December 21st, 2013, 04:26 PM »
Actually when we switched to php 5 only, it was so we could remove all legacy code. ;)
Not the case here, although I could remove magic quotes. Yay.

forumsearch0r

  • Posts: 118
Re: Minimum PHP version?
« Reply #4, on December 21st, 2013, 05:16 PM »Last edited on December 21st, 2013, 06:19 PM
Quote from Nao on December 21st, 2013, 02:20 PM
So, this just means-- "I'd really like to use PHP 5.3 in Wedge."
But then, it also means that a third of all servers won't be able to install Wedge.
So?

Two incidents will happen:

1. More users will use a more modern server (change their provider or even rent their own servers) as more web applications require a newer PHP version.
2. Following that, more providers will see that they should keep PHP up-to-date.

Win-win.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Minimum PHP version?
« Reply #5, on December 21st, 2013, 05:52 PM »
It's hard to be in the group that forces people to upgrade because they also get criticized for it. But yes if frameworks like Laravel can be popular, there's no reason to believe it will be the death of Wedge.

Simply, couple of years ago, someone complained that they couldn't install Wedge because of php limitations and I seriously wanted to help with that. I'm afraid I might 'lose' the opportunity for Wedge to be on great forums that are on slightly less thrilling hosts.

forumsearch0r

  • Posts: 118
Re: Minimum PHP version?
« Reply #6, on December 21st, 2013, 06:20 PM »
No one forces anyone to upgrade. Still, if there's no valid reason to update PHP as everything still supports ancient versions, no one will.
Quote
# php -v
PHP 5.5.7 (cli) (built: Dec 15 2013 01:29:16)
:whistle:

Farjo

  • "a valuable asset to the community"
  • Posts: 492
Re: Minimum PHP version?
« Reply #7, on December 21st, 2013, 07:18 PM »
People have to upgrade, it's the way it is. Whether it's the OS, hardware, your camera, things just start to stop working if you leave things the same.

And those are the stats now, but usage changes quickly and who knows what they will be when Wedge v1.0 is released?

And perhaps it'll keep the cheapo riff-raff away :P

Wanchope

  • Posts: 234
Re: Minimum PHP version?
« Reply #8, on December 21st, 2013, 07:58 PM »
5.4
My SMF forum I will convert is running on cloud vps so no problemo for that.

Aaron Smith

  • The mini menus on Thoughts... Damn Sexy!
  • Posts: 39
Re: Minimum PHP version?
« Reply #9, on December 22nd, 2013, 08:47 AM »
I think the minimum version should be whatever makes the best software. It seems to me there are a lot of benefits to be gained at that 5.3 threshold without the loss of too many possible hosts.

Although it should be noted that I'll run whatever version is necessary to run Wedge. Most VPS servers can easily be upgraded with a simple ticket. So really only shared hosts are at risk in this equation I think.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Minimum PHP version?
« Reply #10, on December 22nd, 2013, 09:42 AM »
Powerbob, can't you ask your host for php 5.3 support..? What is your host, anyway?

Wanchope

  • Posts: 234
Re: Minimum PHP version?
« Reply #11, on December 22nd, 2013, 09:50 AM »
I doesn't take anything to upgrade new PHP version, any shared hosting that doesn't have the latest version of PHP is not worth using.
ASk the host to upgrade.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Minimum PHP version?
« Reply #12, on December 22nd, 2013, 12:23 PM »
Yes, I think I'll be going for PHP 5.3
I'm mostly convinced by the fact that PHP 5.2 is End of Life, its last version was released over 2 years ago, and even 5.3 is nearing End of Line (July 2014), and will no longer receive any bug fixes, only security fixes, apparently. Going for 5.4-only was a joke in my poll, because it's clearly not widespread enough, but 5.3 seems more realistic to me.
Also, I can afford that because Wedge is imported from SMF, so if someone can't use it, they can still remain on SMF, or switch to ElkArte or Protendo for instance. Really, not a big deal.
Myself, I guess I'm more concerned with pushing things forward.

My main concern right now, though, is to ensure that all of the faithful Wedge followers can install it when it's available. I seem to remember that back in the private alpha days (a year ago), someone had trouble with a feature that was 5.3-only, but I couldn't find that discussion. Powerbob is a regular on this forum, he's been here for years, and I wouldn't like to leave him on the side of the road. Every regular in here is important to me, it's important that they're satisfied with Wedge, and that they can end up using it on their forums, because that's what they've been waiting for for so long.

My second concern is that even if I went for 5.3... What is the minimum 5.3 version I should adopt? For PHP 5.2, it was 5.2.4 because of the support of \h and a few other goodies. For PHP 5.3, what would be the acceptable version? 5.3.0? Or much higher? According to w3techs, a safe version to use would be 5.3.3, because it's still in use by 21% of all 5.3 installs. But 5.3.2 is also used by 3% of them, should I drop these from my support list without even reading through the 5.3 changelogs? I don't know, honestly...
Re: Minimum PHP version?
« Reply #13, on December 22nd, 2013, 01:08 PM »
Hmm, I spent a few minutes at Powerbob's host (charlottezweb):
- Apparently, it's a host with links to the SMF team (their forum is SMF, and it has members who come from SMF too),
- Their PHP 5 upgrade dates back to 2006, so they have no reasons not to switch to 5.3 (are you sure they never did?)

Considering that 5.2 was released in late 2006 and 5.3 in early 2009, if a host only follows PHP 5.2 releases (which stopped 2 years ago!), then they're clearly out of the game, i.e. they're not willing to do any more work to get things going, and they're only relying on an existing pool of installed websites that bring some monthly cash. I'm not saying it's a 'bad' thing (well, I'm not saying it's not wrong either), but if you're into building new websites, it may be best to do it on a server that's more up to date, because right now, there's a chance your server is, err... How can I say that..? Outdated, not only in terms of software versions, but also in OS patches, and other security fixes.

Security is important, especially because black hats will never stop trying to abuse security holes, and your website is only as safe as the weakest link in your whole hosting chain, i.e. if your OS is outdated you can get hacked even if you're on PHP 5.5, if your PHP is 4.x then you can get hacked even on a new OS, if your Apache is too old, same thing, etc.
Back in 2010, we decided to go for PHP 5.0+, when SMF was still in PHP 4.0 era. It was way overdue. Then a couple of years later, we thought it was safe to require PHP 5.2. But statistics aren't everything. Hosts should be playing the security game, not you. That's what you're paying them for.
So, it's the web software's duty to push for better server updates. Browser updates are harder to consider because it's pretty much impossible to require of your customers/visitors to change their browser from some IE crap to Chrome or something else, and that's who you want to deal with. They're important for you. Your host? You can always switch hosts if you're not happy with them.
I personally have only good things to say about OVH (which hosts Cynagames.com) and AlwaysData (which hosts Noisen and Wedge), two French companies with good prices and a good service. And their software versions are up to date, too!

Powerbob

  • Posts: 151
Re: Minimum PHP version?
« Reply #14, on December 22nd, 2013, 01:38 PM »
Quote from Nao on December 22nd, 2013, 09:42 AM
Powerbob, can't you ask your host for php 5.3 support..? What is your host, anyway?
I have just sent a request to my host, they are normally very good and answer very quickly. Lets wait and see what they come back with :cool:

I am with Charlottezweb and so far never had a problem with requests :eheh: