In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article is about the difference between the efficiency of strtr, str_replace and preg_replace functions. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Having analyzed the source code of strtr before, compare the efficiency of strtr, str_replace and preg_replace:
The code is as follows:
$str =
'1111111100000000000000000000000001110000010000010010000010010000010100000010
'
$str = str_repeat ($str, 1)
$pattern1 = array ('12345) = >', '67891 = >')
$pattern2 = array ('averse = >', '1234567890 = >')
$pattern3 ='/ 12345 | 67891 Zero'
$pattern4 ='/ a | 1234567890 Universe'
$pattern5 = array ('12345,' 67891')
$pattern6 = array ('asides,' 1234567890')
$t = microtime (true)
For ($iTun0; $I
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.