You can use const in class like this:
class Patterns {
const EMAIL = "/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix";
const INT = "/^\d+$/";
const USERNAME = "/^\w+$/";
}
And can access USERNAME
const like this:
Patterns::USERNAME