which is the fast process strpos()/stripos() or preg_match() in php

前端 未结 3 1254
半阙折子戏
半阙折子戏 2021-01-01 05:16

I just want to known which one will be fast of strpos()/stripos() or preg_match() functions in php.

3条回答
  •  盖世英雄少女心
    2021-01-01 06:00

    preg_match is the slowest of the three. stripos will be slower than strpos, since it will have to do extra work to handle case-insensitive matching.

提交回复
热议问题