I found this blog that has run some testes regarding your question, the result was:
- strpos() is 3-16 times faster than preg_match()
- stripos() is 2-30 times slower than strpos()
- stripos() is 20-100 percent faster than preg_match() with the
caseless modifier "//i"
- using a regular expression in preg_match() is not faster than using a
long string
- using the utf8 modifier "//u" in preg_match() makes it 2 times slower
The code used was: