Split deprecated problem


I have this

list($user_email, $domain_email) = split(“@”, $email);

It was returning $user_email and $domain_email from $email.
Now with 5.3.x split is deprecated , how to convert the code above ?

Thank you

I think I have found the solution myself

list($user_email, $domain_email) = preg_split(“/@/”, $email);

It seems to work , is it correct ?

Not really, if you aren’t using regular expressions then split() and preg_match() aren’t what you’re looking for.

What you want is explode().

it’s working