PHP - RegEx Syntax Validation Functions