Morning all
I'm converting a site that I'm working on to be compliant with the latest version of PHP, so I'm going through and replacing all instances of ereg with their non-depreciated equivalent. However I was told about a handy built-in function with PHP called filter_var.
What my question is, is would it make sense to go with filter_var over preg_match? As in is there a performance boost or any other benefits to choosing one over the other, and if so what are they?