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,068
Re: Minimum PHP version?
« Reply #15, on December 22nd, 2013, 01:59 PM »
Yes but upgrading PHP is not a trivial action, of course. Let's see what they have to say.
Which is why they may have decided to stick to 5.2. But since 5.2 was EOL'ed two years ago, it doesn't make sense.
In fact, I'm going to switch to 5.3 on my local install, if only for security.

Do you have any 'active' website, BTW? Because pplb.net only has demos on it, and the root is empty...

Also, did you do a phpinfo() on them, are you sure it's 5.2 on their server? Which one, 5.2.17?

Powerbob

  • Posts: 151
Re: Minimum PHP version?
« Reply #16, on December 22nd, 2013, 02:01 PM »
Cpanel says 5.2.17

Yes I have 4 websites in total with different domain names.

Nao

  • Dadman with a boy
  • Posts: 16,068
Re: Minimum PHP version?
« Reply #18, on December 22nd, 2013, 02:06 PM »
Well... Then, it's time to determine if you're willing to switch hosts for Wedge if Charlottezweb won't update their site for you.

Powerbob

  • Posts: 151

Nao

  • Dadman with a boy
  • Posts: 16,068
Re: Minimum PHP version?
« Reply #20, on December 22nd, 2013, 03:38 PM »
Keep me posted ASAP! (Well, timezones permitting, of course!)

Powerbob

  • Posts: 151
Re: Minimum PHP version?
« Reply #21, on December 22nd, 2013, 04:41 PM »
OK all done, now (well in a couple of hours) on 5.3 :yahoo:
Can you change my vote on the poll for me please? done myself :whistle:

Nao

  • Dadman with a boy
  • Posts: 16,068
Re: Minimum PHP version?
« Reply #22, on December 22nd, 2013, 06:15 PM »
Great! Does this mean 5.3 was already there, but disabled...?

Oracle

  • Posts: 78
Re: Minimum PHP version?
« Reply #23, on December 22nd, 2013, 11:16 PM »
 Using - cloudweb.com > running PHP 5.4.3 - Great host.

Nao

  • Dadman with a boy
  • Posts: 16,068
Re: Minimum PHP version?
« Reply #24, on December 23rd, 2013, 12:10 AM »
Fun fact. I switched my localhost to PHP 5.3.13, and mysqli no longer worked. Switched to 5.4.11, same.
Had to frigging backup, uninstall WampServer, delete everything, reinstall WS, restore my virtualhost data into the httpd.conf file, re-enable rewrite_module (I'm not sure why it's disabled by default........ made me lose 20 minutes), and then it started working again.
All in all: 2 hours used up. Hopefully not all servers are messed up like mine..... :P

Oracle

  • Posts: 78
Re: Minimum PHP version?
« Reply #25, on December 23rd, 2013, 12:42 AM »
Gee I hope you didn't do all this on my account. > I did say 5.4.3 :) - Wonder why my host isn't experiencing problems?

MultiformeIngegno

  • Posts: 1,337
Re: Minimum PHP version?
« Reply #26, on December 23rd, 2013, 02:35 AM »
I voted for 5.4.. let's push the future!!!!!!! :D

forumsearch0r

  • Posts: 118

Hey Arnold!

  • Emperador del Universo
  • Wedge spanish, when? where?
  • Posts: 20

Nao

  • Dadman with a boy
  • Posts: 16,068
Re: Minimum PHP version?
« Reply #29, on December 23rd, 2013, 11:41 AM »
Okay, after 14 votes, I think it's safe to say that PHP 5.3 will be my choice. ;)

- I'll be implementing closures (anonymous functions) for cache_get_data (hopefully, as there are many occurrences to transform), anything that uses the awfully slow and ugly create_function(), and a few other places.
- I'll restore nl2br($stuf, false) functions that I'd replaced with regexes at one point for compatibility.
- I'll try to set up a Wedge namespace, so that I can (finally) safely use simpler function names without risk of any clashes.

For the anecdote, I wrote a closure in an array_map call just minutes ago -- but removed it, because I figured out a much faster solution.

$in_lists array_combine(array_keys($temp['lists']), array_fill(0count($temp['lists']), $id_member));

Versus:

$in_lists array_map(function () use ($id_member) { return $id_member; }, $temp['lists']);

It may be slower, but isn't it beautiful? :P