Ancestors

Written by dseguy on 2024-12-26 at 15:12

A #PHP global constant redefinition is a simple warning.

A #PHP class constant redefinition is a full Fatal Error.

I am so used to the Fatal error, that I expected the global constant to behave the same. Shouldn't they?

[#]phptip #phptrick

https://php-tips.readthedocs.io/en/latest/tips/constant_redefinition.html

=> View attached media

=> More informations about this toot | More toots from dseguy@phpc.social

Written by Sara Golemon on 2024-12-26 at 15:24

@dseguy Fanatical dedication to backwards compatibility, innit? I susect there was concern over breaking WP or something.

=> More informations about this toot | More toots from pollita@phpc.social

Written by Alerta! Alerta! on 2024-12-26 at 15:32

@pollita It would leave a lot of WP installations unusable. And hinder further upgrades...

Because blaming the shitty BC policy of the PHP-team is much easier than fixing shitty code and check whether a constant is already defined before redefining it...

/cc @dseguy

=> More informations about this toot | More toots from heiglandreas@phpc.social

Written by Sherri W (SyntaxSeed) on 2024-12-26 at 16:37

@heiglandreas @pollita @dseguy I've never figured out who these admins are that upgrade #PHP on the server but not #WordPress on the site. 🤔

=> More informations about this toot | More toots from syntaxseed@phpc.social

Written by Alerta! Alerta! on 2024-12-26 at 17:09

@syntaxseed Those that maintain shared hosting where users can install whatever they want?

And users then decide to not use the providers supplied oneclick installer... And also never update WP because "It'll break 😱"

I've seen things.... 🙈

/cc @pollita @dseguy

=> More informations about this toot | More toots from heiglandreas@phpc.social

Written by Sherri W (SyntaxSeed) on 2024-12-26 at 20:45

@heiglandreas @pollita @dseguy I use a lot of shared hosting. Never had the PHP version change from under me- typically I go to my control panel & can choose from versions currently available. I then have to flip the "switch" in order to upgrade PHP.

I feel like people who don't bother with WP upgrades aren't going to do either.

If the version changes from under you, either the host is awful or you ignored years of warnings (we've been getting 5.x discontinuation notices for many years. 🤣

=> More informations about this toot | More toots from syntaxseed@phpc.social

Toot

Written by Sherri W (SyntaxSeed) on 2024-12-26 at 20:46

@heiglandreas @pollita @dseguy But yeah... I'm sure the horror stories are everywhere!

I'm just not sure that "we" (PHP) should be shielding them. 😉

=> More informations about this toot | More toots from syntaxseed@phpc.social

Descendants

Written by Alerta! Alerta! on 2024-12-26 at 21:02

@syntaxseed I hope you didn't get me wrong: We shouldn't!

/cc @pollita @dseguy

=> More informations about this toot | More toots from heiglandreas@phpc.social

Written by Sherri W (SyntaxSeed) on 2024-12-26 at 21:46

@heiglandreas @pollita @dseguy Nope, I was agreeing with you. 😊

=> More informations about this toot | More toots from syntaxseed@phpc.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113721081191887255
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
397.718276 milliseconds
Gemini-to-HTML Time
1.6833 milliseconds

This content has been proxied by September (ba2dc).