News for hackers. Stuff that matters.
Re:Modern PHP features explained – PHP 8.0 and 8.1 by acomjean on Thursday October 27, 2022 @11:25AM (#33358984)
>And a colleague of mine is a huge fan of the new "match" keyword - he's working on a sports management application, and of course he had a "Match" class, used everywhere, which he had to rename...

Namespace?

Re:Modern PHP features explained – PHP 8.0 and 8.1 by rob74 on Thursday October 27, 2022 @11:33AM (#33359143)
Well yeah, I guess he could have prefixed every usage of the class with the namespace, but probably decided to rename it to have less verbose code...
Re:Modern PHP features explained – PHP 8.0 and 8.1 by moritzwarhier on Thursday October 27, 2022 @01:48PM (#33361275)
This would be unneeded if PHP wouldn't have case-insensitive identifiers, right?

But such a breaking change would of course be too much to ask

Re:Modern PHP features explained – PHP 8.0 and 8.1 by masklinn on Thursday October 27, 2022 @11:32AM (#33359124)
If match was made into a hard keyword, there's no fixing it, it just becomes forbidden as a bareword.