What is the potential issue with using the strstr function in PHP when transitioning between different PHP versions?

The potential issue with using the `strstr` function in PHP when transitioning between different PHP versions is that it was deprecated in PHP 7.3 and removed in PHP 8.0. To solve this issue, it is recommended to use the `strpos` function along with `substr` to achieve the same functionality. By checking if the return value of `strpos` is not false, you can then extract the substring using `substr`.

$haystack = "Hello, world!";
$needle = "world";

if (($pos = strpos($haystack, $needle)) !== false) {
    $result = substr($haystack, $pos);
    echo $result; // Output: world!
} else {
    echo "Needle not found";
}