PHP 8 · Web, security and database

Validate input

Check that a value is a valid email address.

$ok = filter_var($email, FILTER_VALIDATE_EMAIL) !== false;

Official PHP 8 documentation

More web, security and database commands

All web, security and database commands · PHP 8 cheatsheet

Was this page helpful?