GroM Thank you for the feedback,
yes, you're right. The editor recognizes only statically defined constants:
const NAME = 0;
- `define('NAME', 0);
We can additionally recognize constants defined in doc comments, i.e. /** @const NAME */ although @const
is not a valid keyword.
In general, it is recommended to add a dummy file (for example .ide-constants.php
) containing define(...)
for all your dynamic constants.