Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6548143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:54:56+00:00 2026-05-25T11:54:56+00:00

I use preg_replace in my Bbcode parse function. I have an array of simple

  • 0

I use preg_replace in my Bbcode parse function. I have an array of simple search strings using regex and an array of simple replace strings. (About 15 lengthy strings each.)

This function is being used very frequently. Could this be the cause of my recent 502s?

I’ve made a few changes and this is one of them. I’m trying to locate the problem.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:54:56+00:00Added an answer on May 25, 2026 at 11:54 am

    I would recommend profiling your application with xdebug. It’s a free extension to php which will show you exactly which functions/portions of code are causing the slow execution.

    However, test it on a local server, because xdebug is very heavy and will slow down your application if used on a production server.

    You can examine xDebug’s output files with Webgrind – http://code.google.com/p/webgrind/

    And to answer your question exactly – I don’t believe preg_replace will cause your script to become this heavy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have well-formed xml documents into string variables. I want to use preg_replace to
I use this function to make links clickable: function clickable($text) { $text = preg_replace(/(https?|ftps?|mailto):\/\/([-\w\p{L}\.]+)+(:\d+)?(\/([\w\p{L}#-;+-\/_\.]*(\?\S+)?)?)?/u,
My question is about memory use and objects in actionscript 2. If I have
I can't quite figure out the right pattern to use with PHP's preg_replace function.
Is there any reason why I can't use preg_replace inside a static function? when
I'm trying to use preg_replace to remove all characters from a string except for
What I want to do is use preg replace to replace matches within a
I have a number of strings which contain words which are bunched together and
'''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move
Use case: A does something on his box and gots stuck. He asks B

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.