ElkArte Community

General => Chit Chat => Topic started by: Flavio93Zena on August 02, 2015, 05:27:01 pm

Title: Php 7.0 Beta
Post by: Flavio93Zena on August 02, 2015, 05:27:01 pm
http://be2.php.net/archive/2015.php#id2015-07-24-1 Well...
How many things did they change to get that far?
How many things will break?
Will it be difficult to upgrade in order to make everything compatible or a PITA that would require complete recoding from scratch?

I'm scared  :-[
Title: Re: Php 7.0 Beta
Post by: Spuds on August 02, 2015, 05:47:27 pm
Considering how fast they are going from alpha->beta1->beta2 you should be scared.
Title: Re: Php 7.0 Beta
Post by: emanuele on August 02, 2015, 06:32:38 pm
Quote from: Flavio93Zena – http://be2.php.net/archive/2015.php#id2015-07-24-1 Well...
How many things did they change to get that far?
They are doing a major release, it's not "that" far. If you mean the reason behind 5 => 7, it is just because only few old geeky farts know that few years ago existed a php 6 project that was aborted.

Hopefully not as many as you may think, but indeed a few.

Quote from: Flavio93Zena – Will it be difficult to upgrade in order to make everything compatible or a PITA that would require complete recoding from scratch?
Absolutely yes, the whole Matrix World will be rewritten from scratch! :P

Quote from: Spuds – Considering how fast they are going from alpha->beta1->beta2 you should be scared.
They have no middle ground! LOL
Title: Re: Php 7.0 Beta
Post by: Flavio93Zena on August 02, 2015, 06:35:23 pm
You scared me even more >_< xD
P.S.: I knew about php 6, but still...
Title: Re: Php 7.0 Beta
Post by: Joshua Dickerson on August 03, 2015, 01:35:55 pm
There are always bc notes for any release. Check them. People say it's the easiest php upgrade they have done but I have not tried it yet. I don't think we will have issues.
Title: Re: Php 7.0 Beta
Post by: Flavio93Zena on August 03, 2015, 03:13:35 pm
Quote from: Joshua Dickerson – There are always bc notes for any release. Check them.
You assume I can read and understand them. BZZZZT, wrong ;D
Title: Re: Php 7.0 Beta
Post by: emanuele on August 03, 2015, 03:39:45 pm
Actually, there is something broken (at least in the tests, I have not been able (yet) to try php7 "live").
I tried it a while ago and forgot about it, but now I resumed the branch and was trying to pinpoint the issue.
It fails in session_start of test_login_cookie and on the first call of validateLoginPassword in the test test_password:
https://travis-ci.org/emanuele45/Dialogo/builds/73946632

At the moment I have no idea what the problem is...
Title: Re: Php 7.0 Beta
Post by: Ant59 on August 31, 2015, 07:36:26 pm
Some interested benchmarks from the release candidate.

https://www.phoronix.com/scan.php?page=news_item&px=PHP-7.0-RC1-Benchmarks
Title: Re: Php 7.0 Beta
Post by: Flavio93Zena on September 01, 2015, 05:20:15 am
Not bad, still scared about how many things it could break though, both here and on smf since elk still contains lots of smf code.
Title: Re: Php 7.0 Beta
Post by: inter on November 26, 2015, 01:29:52 pm
PHP 7.0.0 RC 8 released today  8)
Title: Re: Php 7.0 Beta
Post by: emanuele on November 26, 2015, 03:55:29 pm
/me thinks elk should start working in php 7 too. nods
Title: Re: Php 7.0 Beta
Post by: Eliana Tamerin on November 27, 2015, 12:00:27 am
Quote from: emanuele – /me thinks elk should start working in php 7 too. nods

Too bad it won't be practical to require on hosts for at least 2 years.
Title: Re: Php 7.0 Beta
Post by: live627 on November 27, 2015, 07:49:54 am
yeah, it has some killer features.
Title: Re: Php 7.0 Beta
Post by: emanuele on November 27, 2015, 08:21:53 am
Quote from: Eliana Tamerin – Too bad it won't be practical to require on hosts for at least 2 years.
True, but better be ready "soonish" than late to the party.
The tests are currently broken in php 7 for some session problem as far as I could tell. Have it fixed for 1.1 (final) would be cool, because anyway 1.1 should last for about a couple of years. So, by the time 2.0 is ready we will still be able to work with php 7. :D
Title: Re: Php 7.0 Beta
Post by: ahrasis on November 28, 2015, 09:32:11 am
It can wait...
Title: Re: Php 7.0 Beta
Post by: Spuds on November 28, 2015, 06:00:36 pm
I'm still hoping to sell my php 6 books on ebay :P
Title: Re: Php 7.0 Beta
Post by: emanuele on December 02, 2015, 05:18:39 pm
LOL
Title: Re: Php 7.0 Beta
Post by: emanuele on December 03, 2015, 05:37:34 pm
http://php.net/archive/2015.php#id2015-12-03-1

Released!
Title: Re: Php 7.0 Beta
Post by: Spuds on December 03, 2015, 08:57:32 pm
Pretty cool really .. bit of a shame that distros are so far behind the curve on this.
Title: Re: Php 7.0 Beta
Post by: inter on December 04, 2015, 02:30:04 am
Quote from: emanuele – http://php.net/archive/2015.php#id2015-12-03-1

Released!

awesome!
Title: Re: Php 7.0 Beta
Post by: emanuele on January 01, 2016, 07:14:14 pm
And Elk should now be able to work with php7! :D
https://github.com/elkarte/Elkarte/pull/2339
Title: Re: Php 7.0 Beta
Post by: Spuds on January 02, 2016, 02:03:01 pm
Cool stuff !  I feel so modern,  so 2016 !
Title: Re: Php 7.0 Beta
Post by: emanuele on January 02, 2016, 03:02:03 pm
ROFL!
Title: Re: Php 7.0 Beta
Post by: Jorin on January 06, 2016, 08:55:07 am
Quote from: emanuele – And Elk should now be able to work with php7! :D
https://github.com/elkarte/Elkarte/pull/2339

My hoster informed me PHP 7 is available. Should I use it?
Title: Re: Php 7.0 Beta
Post by: emanuele on January 06, 2016, 09:17:22 am
I'm pretty sure 1.0 will not work on 7.0, so I'd say no. ;)
Title: Re: Php 7.0 Beta
Post by: Flavio93Zena on January 11, 2016, 08:58:59 pm
Wow :O It's barely out and you already made it compatible with it, what the f... O.o
Title: Re: Php 7.0 Beta
Post by: emanuele on January 12, 2016, 02:32:45 am
Actually I was trying to make it compatible in the beta period, though I couldn't figure out what was the problem. When I saw the patch from albertlast (https://github.com/albertlast) for SMF I realized it was not really that difficult and I pushed the patch.
So, technically, SMF could have been compatible before Elk if they were to
merge the PR (https://github.com/SimpleMachines/SMF2.1/pull/3230) before. :P
And I even forgot a piece now that I look more carefully.
Title: Re: Php 7.0 Beta
Post by: Spuds on January 21, 2016, 01:18:43 pm
Feels like PHP is really trying to shed the old versions faster.  

5.5 is only getting security updates for another 5 months,
5.6 is only actively supported (bug fixes) for another 11 months (but security for almost another 3 years, which works well with LTS OS release schedules)
7.0 will be actively (bug fix) supported until Dec/2017 so < 2 years.

But checking the usage stats ... 77% are still on < 5.5 which are unsupported versions.    In 5 months when 5.5 is "obsolete" that number will be 93% running unsupported (no security or bug fixes) versions.  Such a dilemma.
Title: Re: Php 7.0 Beta
Post by: Joshua Dickerson on January 21, 2016, 01:37:40 pm
I think hosts are muchaving more capable today of upgrading than they were in the past. With VMs and containers there's no reason why you can't just ask your host to upgrade you so you can run new software. In the past they would have to move you to a completely different server. So, in general the community will push them to be faster and proactive in upgrades, leading to less people running older versions.
Title: Re: Php 7.0 Beta
Post by: Spuds on January 21, 2016, 02:21:07 pm
I think the push will be a result of some of the "big" names requiring new version ... if the major blog/cms platforms suddenly required 5.6 to run then it would be everywhere as the uses would demand it or go to a host that has it.

Personally I like to run LTS releases, but that means to upgrade to a version other than what was released on the LTS,  I have to add a 3rd party package maintainer that offers a newer version for the LTS that I'm running.    Sometimes I do that, sometimes not ... I just updated a old 12.04 LTS (5.3) site to 14.04 (5.5) which is still old.  But since I was playing I updated that to 5.6 for kicks, not that it was needed.

Now I can't remember what the min is for 1.1, I think its just 5.3 vs 5.2 or is it 5.4 ???
Title: Re: Php 7.0 Beta
Post by: Joshua Dickerson on January 21, 2016, 02:31:30 pm
Pretty sure it was 5.3.x where x I think was json_encode() or something we need. The next version should definitely be >= 5.5 though.

I think Symfony is 5.5 which means phpBB is and I think XF uses Symfony  (or ZF) so it makes sense on that respect.

I think what we're going to see soon is every distro will only maintain the core of the distro and everything will be 3rd party repos with maybe some aggregate repos for newbies or lazy people.
Title: Re: Php 7.0 Beta
Post by: emanuele on January 21, 2016, 03:58:07 pm
const REQUIRED_PHP_VERSION = '5.3.3';
:P
I guess the micro is most a wild guess though. LOL
Title: Re: Php 7.0 Beta
Post by: radu81 on March 28, 2016, 06:56:14 am
I have the possibility to switch php version with a click and I did it, the forum works well on PHP7. Should I keep this version or should I switch back to 5.6?
Title: Re: Php 7.0 Beta
Post by: emanuele on March 28, 2016, 09:41:09 am
In the tests I remember we had to fix some issues with sessions in order to make php 7 happy.
You may try logging in and out to be sure nothing is broken.
Title: Re: Php 7.0 Beta
Post by: radu81 on March 28, 2016, 01:44:54 pm
I can login and logout correctly, but now a user noticed that mentioning an user is not working. For now I switched back to php 5.6 ;) Once this is solved I'll do other tests
Title: Re: Php 7.0 Beta
Post by: emanuele on March 28, 2016, 02:54:02 pm
Interesting, off the top of my head I can't say why it would not work.
I'd have to debug it, but first I'd have to have a php 7 environment... that may require some time...
Title: Re: Php 7.0 Beta
Post by: radu81 on March 28, 2016, 03:30:48 pm
no hurry and no reason for me to switch now to php 7.0, but I confirm that mentioning was not working on my forum with php 7.0 ( no username was showed once typed @... )
Title: Re: Php 7.0 Beta
Post by: emanuele on April 29, 2016, 03:08:48 am
We are almost there! :D
http://w3techs.com/technologies/history_details/pl-php/5/y
Next month we may celebrate php 5.6 usage share surpassing php 5.2!! :D (Hopefully xD)
Title: Re: Php 7.0 Beta
Post by: Flavio93Zena on April 29, 2016, 05:06:31 am
The problem is that "almost" part ;D
Title: Re: Php 7.0 Beta
Post by: radu81 on April 29, 2016, 06:33:27 pm
from what I've read most CMS's are moving to support PHP 7, joomla did it with the latest version 3.5, and after it's release a good part of the extensions were also updated to support php 7. Also Grav CMS (https://getgrav.org/) supports and encourage to use PHP7. Same for XF. I have no idea about wordpress since I don't use it
Title: Re: Php 7.0 Beta
Post by: Spuds on April 29, 2016, 06:42:50 pm
I say we drop support of php5 ... lets be progressive !
Title: Re: Php 7.0 Beta
Post by: Flavio93Zena on April 29, 2016, 06:48:46 pm
Roflmao  ;D
Title: Re: Php 7.0 Beta
Post by: emanuele on April 29, 2016, 07:18:37 pm
Well, IIRC Elk already support php 7. :P
At least in 1.1 (even though I'm not entirely sure it works in all conditions, but okay).

I wonder how long it will take for 7 to reach a 10% of install base. LOL

Actually, the link I posted is slightly biased, because it's based on the... first "n" million most "famous" websites, so it's likely those sites work on custom code that is likely to run on a certain version of php and adoption of new releases is not gonna happen overnight. but it's a good indicator. ;D
Title: Re: Php 7.0 Beta
Post by: Flavio93Zena on April 29, 2016, 07:22:00 pm
Considering 7 breaks quite a number of things, I believe it will take a while  :-\  For now, I'll stay in that 5.6 fraction.
Title: Re: Php 7.0 Beta
Post by: Spuds on April 29, 2016, 07:36:24 pm
I'd say its going to be a long haul ... but I was very glad to see that Ubuntu LTS 16.04 (April 2016) has 7.0 as the default package.  Getting the LTS distros will help a bunch in quicker adoption.
Title: Re: Php 7.0 Beta
Post by: emanuele on April 30, 2016, 03:00:09 am
BTW, interesting about LTS. Considering php release cycle and support I guess "going with the latest" is the only choice that makes sense (5.6 active support is going to end in December, while only security fixes will last for another couple of years... even though, php 7 security support will end 1 month earlier than 5.6 :o , and ubuntu has to support 16.04 since 2021).

Speaking of ubuntu and LTS, I have to update my VPS... xD
Title: Re: Php 7.0 Beta
Post by: Frenzie on May 02, 2016, 06:50:51 am
My VPS is on Debian Jessie. I just want that stuff to work. My desktop is on Stretch; a little riskier but generally worth it. That being said, a libxinput or X11 update a couple of days ago seems to have broken the xorg.conf EmulateWheel option. :/

Um, what was my point? I don't even run Elk on my personal el cheapo VPS but on shared hosting, lol. (However, I can select my PHP version at will on the shared hosting config, all the way from 5.2 to 7.0.) Oh yes, I remember. I was going to say you might want to wait for the first point release of Ubuntu 16.04, which won't be for another few months. Although the worst bugs should obviously already be gone thanks to the beta and actual launch. :P
Title: Re: Php 7.0 Beta
Post by: ahrasis on May 19, 2016, 08:09:55 pm
Quote from: emanuele – Actually, there is something broken (at least in the tests, I have not been able (yet) to try php7 "live").
I have tried and, sighed, I really hate it because I don't know much to fix many things that are made deprecated by it.

Quote from: emanuele – I'm pretty sure 1.0 will not work on 7.0, so I'd say no. ;)
It works alright except for buffer. I can't get addon that use buffer to work at all. However, I haven't use it for long.

Quote from: Frenzie – ... the first point release of Ubuntu 16.04, which won't be for another few months.
Sad, it doesn't support php version lower than 7. I have to hack for version 5.6 to work, sighed.

I would advise those who is running Trusty (14.04) not to upgrade to Xenial (16.04), unless you really know what you are doing.