I expected the following to work but it doesn\'t seem to.
They're not static constants, just constants
class Patterns { const EMAIL = "/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix"; const INT = "/^\d+$/"; const USERNAME = "/^\w+$/"; } echo Patterns::EMAIL;