redknight Posted June 15, 2009 Share Posted June 15, 2009 I'm using str_replace to filter out specific words. But I'm wondering if it's ok to use this for example 1000 words. The script is embedded in 5 different pages. ??? ty in advance Quote Link to comment https://forums.phpfreaks.com/topic/162293-solved-1000-str_replace-replacements-good-or-bad/ Share on other sites More sharing options...
PugJr Posted June 15, 2009 Share Posted June 15, 2009 Why would it be bad? Some things gotta be censored. It should still be quite trivial as far as computing power goes. Quote Link to comment https://forums.phpfreaks.com/topic/162293-solved-1000-str_replace-replacements-good-or-bad/#findComment-856588 Share on other sites More sharing options...
Adam Posted June 15, 2009 Share Posted June 15, 2009 Yeah it would be fine, but I'd suggest passing them in as an array and not looping through them. Quote Link to comment https://forums.phpfreaks.com/topic/162293-solved-1000-str_replace-replacements-good-or-bad/#findComment-856589 Share on other sites More sharing options...
redknight Posted June 15, 2009 Author Share Posted June 15, 2009 Thanks I was a bit worried about using to much server resources. And yes , I'm using "array". gr. Quote Link to comment https://forums.phpfreaks.com/topic/162293-solved-1000-str_replace-replacements-good-or-bad/#findComment-856593 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.