Example 1 — Find the Rest of a String
Search without worrying about upper or lower case.
<?php
$email = "[email protected]";
$rest = stristr($email, "EXAMPLE");
echo $rest, PHP_EOL; How It Works
- Store an email address with mixed case in the domain.
- Search for "EXAMPLE" in uppercase.
- stristr ignores case and finds the match.
- It returns everything from the match to the end, with the original case kept.

