How to fix ‘Function eregi() is deprecated’ in PHP 5.3.0

Published on

Problem or the issue: Previously eregi used to validate email address input using regular expression. That would return true if given email address matches to username@domain.ext pattern. Unfortunately, after upgrading PHP to the new version (5.3.0), it won’t work properly and throw notices. This is because eregi is one of several functions that are deprecated in the new version … Continue reading How to fix ‘Function eregi() is deprecated’ in PHP 5.3.0

What are the deprecated functions in PHP 5.3.0

Published on

The list of functions that are deprecated in PHP 5.3.0: call_user_method() (alternative: call_user_func() ) call_user_method_array() (alternative: call_user_func_array() ) define_syslog_variables() dl() ereg() (alternative: preg_match() ) ereg_replace() (alternative: preg_replace() ) eregi() (alternative: preg_match() with the ‘i’ modifier ) eregi_replace() (alternative: preg_replace() with the ‘i’ modifier ) set_magic_quotes_runtime() and its alias, magic_quotes_runtime() session_register() (alternative: the $_SESSION superglobal ) … Continue reading What are the deprecated functions in PHP 5.3.0