Hi all,
I'm new in this site. I want to ask about PHP programming. How do we can handle deprecated function in PHP. I want to redirect it to my new function. As we know, ereg function has been deprecated in PHP 5.3.0 and recommended to preg_match (posix to PCRE). But, when we wrote a lot of code with ereg function, do we have to change it manually? I want a solution like this.
function ereg($pattern, $string, &$array) { return preg_match('#'.$pattern.'#', $string, $array); }
The main problem is not the ereg function, but solution of handling deprecated function. I've been searching in Google. Someone suggest to use override_function (using APD extension). But, this extension is hard to find (I need precompiled extension build for windows). Anyone can help me? I'm sorry for my bad English. I hope you can understand.