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.) 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):