What is the best way to search for a specific character sequence in a text using PHP?

When searching for a specific character sequence in a text using PHP, the best way is to use the `strpos()` function. This function searches for the first occurrence of a substring within a string and returns the position of the match if found. If the substring is not found, it returns `false`.

$text = "This is a sample text to search for a specific character sequence.";
$substring = "sample";

if(strpos($text, $substring) !== false) {
    echo "The substring '$substring' was found in the text.";
} else {
    echo "The substring '$substring' was not found in the text.";
}