在PHP中替换字符串的最快方法 [英] Fastest way to replace string in PHP

查看:155
本文介绍了在PHP中替换字符串的最快方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在PHP代码中替换一些字符串以使其看起来更好.最好的方法是什么?

I need to replace some string in a PHP code to make it look better. What would be the best way to go about that?

推荐答案

通常的怀疑者是 str_replace preg_replace .

The usual suspects would be str_replace and preg_replace.

这篇关于在PHP中替换字符串的最快方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆