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 387511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:40:49+00:00 2026-05-12T15:40:49+00:00

I have two questions, one is wordy and one programmy! 1) I know that

  • 0

I have two questions, one is wordy and one programmy!

1) I know that PHP reporting on notices causes performnace problems (takes time to report on these errors and figure out what sort of error it is) but is this the same case if error_reporting is turned off? I guess it still does slow down performance but not as much as displaying it to output? Is this true?

2) Could somebody also help me turn this:

//Remove characters. Anything apart from a-z(upper and lower case), numbers, periods [.]
$cleanstring = ereg_replace("[^A-Za-z0-9]^[,]^[.]^[_]^[:]", "", $critvalue);

In to something more efficient and making use of preg replace rather than ereg replace. I just tried replacing the function but I get a Unknown modifier ‘^’

Also, would be great to get some links on improving performance and tweak tips you guys use!

Thanks all

  • 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-12T15:40:50+00:00Added an answer on May 12, 2026 at 3:40 pm

    1.) Turning error reporting off should increase performance, the part of the error reporting process that consumes the most time is either outputting the error message or calling custom error handlers (I don’t know, haven’t measured. This is my guess).

    2.) PCRE regular expressions require you to delimit your RE, have a look at the docs. Besides, you RE looks a bit broken, I think it was meant to be something like this (replace anything that is not a letter, a number, comma, period, underscore or colon with the empty string):

    preg_replace('/[^A-Za-z0-9,._:]/', '', $string);
    # If you want to support characters in any language (like umlauts in german,
    # for example - öäü), not just the letters a-z, you should use the unicode
    # properties:
    # http://php.net/manual/en/regexp.reference.unicode.php
    preg_replace('/[^\PL\PN,._:]/', '', $string);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two questions: (1) I learned somewhere that -O3 is not recommended with
I have two questions about binary search trees - one about the code I
I have two String.printable mysteries in the one question. First, in Python 2.6: >>>
Possible stupid question: let's say I have two apps contained within one project. Can
The question has two parts, one of which I already have the answer for.
Background This question is in two parts. I have a one-way WCF operation hosted
I have two questions: 1) How can I make an array which points to
I have two questions. Do realloc() and memcpy() copy the entries in an array
I have two questions: 1) I have a few global variables for my website
I have two questions: From personal experience, what free blog engine is the best

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.