Home  >  Article  >  Backend Development  >  preg_match_all 性能低.效率差.有其它办法吗?解决思路

preg_match_all 性能低.效率差.有其它办法吗?解决思路

WBOY
WBOYOriginal
2016-06-13 11:36:521242browse

preg_match_all 性能低.效率差.有其它办法吗???
原来用preg_replace_callback发现效率低.
改成preg_match_all  + str_replace
str_replace几乎不花时间. preg_match_all执行一次要花0.5秒以上.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn