I’ve set about upgrading my server to PHP 5.3 & faced a lot of website errors because of depreciated functions, in particular the ereg() function.
I then obviously had to go through all of the sites on the server to find the depreciated functions & I used Dreamweaver’s search by regular expression to do this, which is a quick way to find these functions.
Paste this code into your find box:
(call_user_method([\s]+)?\(|call_user_method_array([\s]+)?\(|define_syslog_variables([\s]+)?\(| dl([\s]+)?\(|ereg([\s]+)?\(|ereg_replace([\s]+)?\(|eregi([\s]+)?\(|eregi_replace([\s]+)?\(|set_magic_quotes_runtime([\s]+)?\(|session_register([\s]+)?\(|session_unregister([\s]+)?\(|session_is_registered([\s]+)?\(|set_socket_blocking([\s]+)?\(| split([\s]+)?\(|spliti([\s]+)?\(|sql_regcase([\s]+)?\(|mysql_db_query([\s]+)?\(|mysql_escape_string([\s]+)?\()
In the “Find in” box select entire local site & make sure you have the tickbox “Use regular expression” ticked – this will then find all of the depreciated functions in that particular local site… awesome.