strstr() and stristr both are used to find the first occurence of the string but stristr( ) is case insensitive.
strstr() - Find first occurrence of a string
Syntax:
strstr ($string, string)
Example:
<?php
$email = 'rajesh@tEst.com';
$domain_name = strstr($email, 'E');
echo $domain_name;
?>
Output:Est.com
stristr() - Find first occurrence of a string (Case-insensitive)
Syntax:
stristr ($string, string)
Example:
<?php
$email = 'rajesh@tEst.com';
$domain_name = stristr($email, 'E');
echo $domain_name;
?>
Output: esh@tEst.com