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

Toot

Written by galvao|galvaoetibr@bsky.social on 2024-12-26 at 15:14

@dseguy That deserves a RFC

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

Descendants

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

@galvao Indeed, you're right.

I would start with a legacy check: in particular, multiple inclusion of the same would be now a Fatal error.

And with autoload, it might be a tiny fraction of codes.

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

Written by galvao|galvaoetibr@bsky.social on 2024-12-26 at 15:19

@dseguy Do you have karma to do it?

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

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

@galvao I can check (a lot) of code, and write the RFC. Most of the value would be here.

Then, find someone else to do it :) .

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

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

This content has been proxied by September (ba2dc).