Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Coding Dojo - PHP Best Practices - Simple Validation
// Returns '', a valid email.
echo filter_var("", FILTER_VALIDATE_EMAIL), '<br/>';
// Return '', a valid URL.
echo filter_var("", FILTER_VALIDATE_URL), '<br/>';
// Return '', a valid IP.
echo filter_var("", FILTER_VALIDATE_IP), '<br/>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment