- var_dump: documentation ( source)
- filter_var: documentation ( source)
<?php
$email = 'jesuis@tropun.ninja';
$autreemail = '"very.unusual.@.unusual.com"@example.com';
$encoreunpourlaroute = "#!$%&'*+-/=?^_`{}|~@example.org";
$pasemail = 'jesuistroppasunninja';
var_dump(filter_var($email, FILTER_VALIDATE_EMAIL));
var_dump(filter_var($autreemail, FILTER_VALIDATE_EMAIL));
var_dump(filter_var($encoreunpourlaroute, FILTER_VALIDATE_EMAIL));
var_dump(filter_var($pasemail, FILTER_VALIDATE_EMAIL));