Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Partially Hide Email in Php
- This will turn [email protected] into g*****@g*****.com and
- [email protected] will become m*******@g*****.co.uk
- and [email protected] into t*********@g*****.com
- */
- <?php
- $email = preg_replace('/(?:^|@).\K|\.[^@]*$(*SKIP)(*F)|.(?=.*?\.)/', '*', $email);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement