First, in broadest terms, the function's purpose is to "match what is in the first pattern, then replace it with the second pattern, using the third argument as the string to operate on."
首先,从最主要的角度来看,函数的目的是“查找与第一个模式中的值匹配的字符串,然后通过将第三个变量作为要操作的字符串,以第二个模式替换匹配结果”。
The preg_replace function can operate on a single string or an array of strings.
preg_replace函数可以对单个字符串或字符串数组进行操作。
You can use string (instance) methods to operate on any property value, and you can call the static methods of many system classes.
可以使用字符串(实例)方法来操作任何属性值,还可以调用许多系统类的静态方法。
应用推荐