I am trying to do something like bitwise enumeration in PHP according to this answer . However, although it worked well when I defined all constants as regular ints, for example:
final class CountryEnum { const CZ = 1;
This does not work when I try to determine the values ββusing the bit change pattern, i.e.:
final class CountryEnum { const CZ = 1;
When I try to run this, PHP gives a suitable word
Parse error: parse error, pending ','' or '; ' 'in CountryEnum.php in line [line with constant DE]
So I probably missed some fundamental basic things, but I'm at a loss.
source share