Wedge

Public area => The Pub => Topic started by: Nao on March 18th, 2017, 01:02 PM

Title: PHP 5.4?
Post by: Nao on March 18th, 2017, 01:02 PM
Since Wedge is 5.3+, maybe it's safe to simply up the min reqs to 5.4..?

The main advantage is the ability is use [ ] instead of array( ) inside the code. It's really just that.
I could also modify Subs-CachePHP.php to automatically replace [ ] with array() as needed. I can't be arsed for now.

I just checked, and 5.3+ is supported by ~90% of the user base, and 5.4+ by ~70%... Hmm. Then again-- what we care about is the current userbase, as I've long given up on turning Wedge into a popular engine. It's just the cool engine that people in the know use.

Anyway, I'm likely to go for PHP 5.4 + some support for PHP 5.3, but I can't be arsed to code said support for now. ;)
Title: Re: PHP 5.4?
Post by: Jurien on March 18th, 2017, 02:30 PM
Quote from Nao
Since Wedge is 5.3+, maybe it's safe to simply up the min reqs to 5.4..?
Well PHP 5.3 is by far the slowest PHP version,PHP 5.4 and PHP 5.5 are slightly faster,(all approaching end of life and upgrading is advisable),PHP 5.6 however is the old stable version,so i would say minimum recommended PHP 5.6
Title: Re: PHP 5.4?
Post by: CerealGuy on March 18th, 2017, 08:06 PM
I guess we can safely increase it to 5.6 even if we should recommend php7 just because it's noticeable faster. Sure, the thing with php versions is always the slow upgrade of webspace providers but do we have to care about them? Do we have the manpower to support old/outdated php versions? Does it even make sense?
Title: Re: PHP 5.4?
Post by: Johnny54 on March 18th, 2017, 09:14 PM
http://php.net/supported-versions.php
Everything older then 5.6 is EOL and no longer supported. Not even security updates so I would drop them.

The past half year I bombarded my cheap hosting provider to finally dump 5.5 and install at least 5.6x
He did and I can now choice between 5.6x and 7.x :eheh:
Title: Re: PHP 5.4?
Post by: Nao on March 18th, 2017, 10:50 PM
I'd started doing something quick'n'dirty in just two lines of code, but then it started getting complicated, even with just two lines, so I give up for now. :P

I'd rather stick to the lowest 'acceptable' version that Wedge actually supports.
If I start asking for a higher version, I'll start using "??" as a replacement to "?:" (basically removes the need to do an isset() call), and then I'll start wondering if I shouldn't ask for PHP 7.1 support so that I can do [$foo, $bar] = func(); instead of list ($foo, $bar) = func(), but I'm NOT actually using list() much in Wedge, so who cares about that... :P

Well yeah, so I guess PHP 5.4 is doable, just hoping that no one currently using Wedge will be locked out of it. I'm surprised no one replied to the poll though. ^^
Title: Re: PHP 5.4?
Post by: Nao on March 19th, 2017, 12:26 AM
Implemented.
Go crazy with [ ] now ;)
Also removed all magic quote shit. It felt good!
Title: Re: PHP 5.4?
Post by: Kian on April 3rd, 2017, 09:15 PM
to delete
Title: Re: PHP 5.4?
Post by: Nao on April 3rd, 2017, 10:51 PM
Tiens, je me souvenais même pas que PNR était passé sous Wedge... :^^;:
Faudra faire quelque chose pour la bannière invisible, par contre... Ça fait tache ! :(
Tu postais pour quoi ? Un problème avec ta version de PHP..?
Title: Re: PHP 5.4?
Post by: developer on May 26th, 2017, 02:11 PM
EVERY VERSION STARTING FROM PHP 7.0 UPWARDS IS GENERALLY SHIT
Title: Re: PHP 5.4?
Post by: Zeyad_Ahmed on May 27th, 2017, 06:06 PM
i just staying in 5.3 will make wedge more open , that is my opinion
Title: Re: PHP 5.4?
Post by: Nao on May 28th, 2017, 01:33 AM
Quote from developer on May 26th, 2017, 02:11 PM
EVERY VERSION STARTING FROM PHP 7.0 UPWARDS IS GENERALLY SHIT
U crazy?
Title: Re: PHP 5.4?
Post by: Kian on May 29th, 2017, 10:56 PM
Quote from Nao on April 3rd, 2017, 10:51 PM
Tiens, je me souvenais même pas que PNR était passé sous Wedge... :^^;:
Faudra faire quelque chose pour la bannière invisible, par contre... Ça fait tache ! :(
Tu postais pour quoi ? Un problème avec ta version de PHP..?
Je ne sais plus :^^;:  peut-être un problème de PHP corrigé en éditant 2 lignes, ou alors causé finalement par un plugin je ne sais plus exactement.

Je me souviens juste d'avoir commenté les lignes qui renvoyaient des erreurs. Je suis en tous cas en PHP 5.6.30

Concernant la bannière oui, en effet... elle fonctionne si tu désactive AdBlock, je n'ai pas cherché plus loin.

Edit : bannière déplacer à la racine et renommée, elle apparaît :p (oui ce sont 2 bannières côtes à côté, je n'ai pas fait beaucoup d'efforts)
Title: Re: PHP 5.4?
Post by: Nao on June 9th, 2017, 11:00 PM
Quote from Kian on May 29th, 2017, 10:56 PM
Je ne sais plus :^^;:  peut-être un problème de PHP corrigé en éditant 2 lignes, ou alors causé finalement par un plugin je ne sais plus exactement.
Je passe mes journées à améliorer des designs et à corriger des conneries dans ce genre, hein, si besoin :P

(https://lestrades.com pour voir ce sur quoi je bosse depuis quelques mois... Ca tourne sous Wedge, bien sûr !)
Title: Re: PHP 5.4?
Post by: Ice Flake on June 12th, 2017, 10:44 AM
Backward compatibility is evil and leads to drastic consequences. I've created a new account to post this because of its evil. Since this topic is about 5.4, I'll choose 5.4 here, but if I were in your place, I would've simply dropped PHP 5 and required PHP 7.

PHP becomes comparable (and even better in some cases) to other scripting languages after the PHP 7 mark. It is also supposed to be much faster. PHP 5 in all its glory feels like a weak language. Not weak as in weakly typed, but weak because it feels like a toy language. You'll get more work done overall with PHP 7 in a shorter amount of time.

An additional benefit is to encourage others to upgrade their PHP versions which, whether they realize it or not, is for their own good.
Title: Re: PHP 5.4?
Post by: Nao on June 12th, 2017, 12:53 PM
It's not *much* faster in the case of Wedge. It is definitely faster, but not noticeably so, I'd say. I compared both PHP versions with it.
I absolutely recommend that everyone upgrades to PHP 7.x, of course.
But Wedge is based off SMF, which itself, at the time of forking, was compatible with PHP 4... So I started by making it PHP 5-only, then PHP 5.3, then PHP 5.4... I'm basing my assumptions off https://w3techs.com/technologies/details/pl-php/all/all, and as you can see by going 5.4+ I cut myself off from potentially ~25% of all PHP users. It was already a bold move....
Going 7.x+ only will cut me off from 95% of all PHP users. That's not something I can do, obviously. I still have some hope that Wedge will eventually make itself known as one of the better free platforms.