Basically, I develop websites, some large with many crud operations, etc...
However I've gotten into the habit of storing every re-usable constdata as a constant in my PHP applications
I currently have 44 constants defined in one application.
These range from:
- Database config
- Home page for admin and guest
- url slug names
- declaring development mode
- declaring maintenance mode
- a few directory shortcuts ( instead of writing /admin/temaplatestemplates/images ill use a CONSTconst ADM_IMAGES )
- session names
- cookie names
- random things like MAX_IMAGE_SIZE, THUMB SIZETHUMB_SIZE and MAX_LOGIN_ATTEMPTS
I don't have any problems using all these constsconstants... It's kind of helpful having all these in my application.
I just wanted to know if its a 'good practise' to use LOTS of consts.them in this excess
If not, how else could these conststhis data be encapsulated to be useful AND easy enough to reach in my application? Also bearing readability in mind.