Welcome to UW-Milwaukee Forum
The maximum number of users allowed on UW-Milwaukee Forum is 250.
Understanding Constants in PHP
Definition of Constants?
Constants are simply identifiers attached to a certain value. Constants cannot be changed when the script is running.
In my example above, the constant remains the same while the script is running. Here it would be the number of visitors on my site.
Here are a couple of examples:
- SITE_NAME: The name of the website ("UW-Milwaukee Forum"). This is a constant as it won't change whatsoever while the page is running. I would have to edit the script for it to change.
- MAX_USERS: The maximum number of users allowed on the site (250). Again, this value will not change, so it is defined as a constant.
Difference between Constants and Variables
- Constants cannot be changed once they are set, while variables can have their values be redefined.
- Constants are mostly written in numbers while variables use symbols and letters.