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

Toot

Written by Gina Peter Banyard on 2024-12-26 at 16:05

@pollita @dseguy it used to be a notice in PHP 7 and was elevated to a warning in 8.

I'm sure we will just have another round of elevating warnings to errors in PHP 9.

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

Descendants

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

This content has been proxied by September (ba2dc).