Which method is preferred strstr or strpos?

From the PHP online manual:

If you only want to determine if a
particular needle occurs within
haystack, use the faster and less
memory intensive function strpos()
instead.

Leave a Comment