Is there any reason why I can’t use preg_replace inside a static function? when I move the code out of it, it works perfectly. Any ideas?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Funny, because this works fine:
returns: “ok, but what’s the point…”
We will need to see your code before we can tell you what is wrong. Using preg_replace inside a static function is definitely not the problem.
Edit: I actually edited the above useless function to improve it. Might as well face it, I’m addicted to refactoring.