I usually checked this with the following code:
if(preg_match($email,$article->text) == true) {
to something
}
In PHP 8 this is deprecated, because I can’t always guarantee that there really is an email in it. What are the alternatives?
When searching, I did not find a solution. “str_contains” seems to allow only one string.