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

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

WBOY
Release: 2016-06-13 12:36:12
Original
1279 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template