How do I refer to the message "Deprecated: The eregi () function is deprecated ..."?

I see the following message on my site: what should I do?

Deprecated: the eregi () function is deprecated in D: \ wamp \ www \ cidoc.gov.mz \ modules \ mod_swmenupro \ functions.php on line 2542

+3
source share
2 answers

The following is a list of deprecated and replacement features

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()insteaderegi()

+3
source

You are using the eregi () function, which was deprecated in PHP 5.3.0

You can

and. upgrade php version (not recommended) or

b. use stristr (). The manual has a comment saying that you can use to replace the code in your files:

eregi php 5, stristr, .

:

eregi\(([^,]*),([^)]*)\)
stristr(\2,\1)

.

+1

Source: https://habr.com/ru/post/1784472/


All Articles