which is the fast process strpos()/stripos() or preg_match() in php
问题 I just want to known which one will be fast of strpos()/stripos() or preg_match() functions in php. 回答1: 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()