Closed exussum12 closed 5 years ago
Hey, thanks for PR. As I agree that sometimes it really makes sense to disallow array constants I don't want to put it as default behaviour:) can we make an option to toggle this?)
This way falls back to the settings which the user sets. Which imo would be expected handling. When the code was written it was targeting 5.5 which doeant have array constants. This was added in 5.6.
Personally I think this acts as intended as it respects the already passed in flags
Example
const something = 2; should be accepted but having a const array should not
const something = [1,2,3]; should be something like
const number = 2; const something = [self::number];