I'm seeing the following message on my site, what should I do?
Deprecated: Function eregi() is deprecated in D:\wamp\www\cidoc.gov.mz\modules\mod_swmenupro\functions.php on line 2542
Join Stack Overflow to learn, share knowledge, and build your career.
I'm seeing the following message on my site, what should I do?
Deprecated: Function eregi() is deprecated in D:\wamp\www\cidoc.gov.mz\modules\mod_swmenupro\functions.php on line 2542
Here is a list of deprecated functions and the replacement functions
Function replacements POSIX PCRE
ereg_replace() => preg_replace()
ereg() => preg_match()
eregi_replace() => preg_replace()
eregi() => preg_match()
split() => preg_split()
spliti() => preg_split()
sql_regcase() => No equivalent
user preg_match() instead of eregi()
You're using the function "eregi()" that was deprecated in PHP 5.3.0
You can
a. downgrade your php version (not recommended) or
b. use stristr(). The manual has a comment that says this you can use to replace the code in your files:
because eregi is not recommended after php 5, you can replaced it with
stristrif just for simple search.For editors with regular expression function:
eregi\(([^,]*),([^)]*)\) stristr(\2,\1)
I have not tried this.