I wish PHP 9.0 had a feature called "Flag".

No more bitwise operators, just fluent flag declaration. I'll prefer that rather than adding numbers and then wondering what is "8 | 16".

#Programming #Code #Coding #PHP #SoftwareDevelopment #WebDevelopment #WebDev #PHP9

@darkghosthunter What you want are Enum Sets.

I want them, too.

@Crell Like manually adding 2, 4, 8, 16, 32, 64...? I mean, I don't want everyone to memorize that. I would prefer having a Flag declaration.
@darkghosthunter I don’t get it? You can just use constants or enums for this. I don’t even understand how to read your code. What does the property access on the case do? Instead of understanding bitwise operators I need to understand a different concept now.