KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I expected the following to work but it doesn't seem to. <?php class Patterns { public static const EMAIL = "/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix"; public static const INT = "/^\d+$/"; public static const USERNAME = "/^\w+$/"; } Because it throws this error: syntax error, unexpected T_CONST, expecting T_VARIABLE
Tags (comma-separated)
Save Edits
Cancel