When you upgrad to PHP 5.3+, you will run into a ereg deprecated function messages.
You need to use preg instead of ereg.
Ereg example
eregi('\.([^\.]*$)', $from, $to);
can replace with preg_match
preg_match('#\.([^\.]*$)#i', $from, $to);
notice the hashmark, which are RegExp delimiters!
Look the i modifier! If you delete it, you’ll get the ereg() method
ereg_replace()
$var = ereg_replace('[^A-Za-z0-9_]', '', $var);
becomes preg_replace()
$var = preg_replace('#[^A-Za-z0-9_]#', '', $var);
Not too complicated, right? Again: #