Title: PHP Deprecated:  Function eregi() is deprecated
Last modified: August 21, 2016

---

# PHP Deprecated: Function eregi() is deprecated

 *  Resolved [Gone Fishin](https://wordpress.org/support/users/terryg-1/)
 * (@terryg-1)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-deprecated-function-eregi-is-deprecated/)
 * I am getting PHP errors in a php_errorlog file in the ‘img’ directory of this
   plugin:
    “PHP Deprecated: Function eregi() is deprecated in ~/wp-content/plugins/
   wp-spamshield/img/img.php on line 58”
 * I got this before upgrading to 1.0.1.0, but I see that the ‘egigi’ function is
   still being used on line 58 even in the latest version.
 * [https://wordpress.org/plugins/wp-spamshield/](https://wordpress.org/plugins/wp-spamshield/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-deprecated-function-eregi-is-deprecated/#post-4773516)
 * What version of php are you using? Just did a quick search…It looks like PHP 
   5.3 has deprecated it. I plan on switching out eregi to preg_match.
 * Looks like That just got moved to number 1 on my to do list.
 *  Thread Starter [Gone Fishin](https://wordpress.org/support/users/terryg-1/)
 * (@terryg-1)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-deprecated-function-eregi-is-deprecated/#post-4773602)
 * PHP version: 5.3.27
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-deprecated-function-eregi-is-deprecated/#post-4773641)
 * Hi terry.g,
 * Ok, thank you. I’m going to be working on this issue, and I plan to have an update
   within a week that takes care of this. I’m going to mark this as resolved, but
   let me know if you need anything else.
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-deprecated-function-eregi-is-deprecated/#post-4773662)
 * Just a follow up. I’ve replaced the code (all instances of eregi), and will be
   testing it for a few days before releasing the next version.
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-deprecated-function-eregi-is-deprecated/#post-4773700)
 * Version 1.1.0.0 fixes this issue. All instances of eregi() function have now 
   been replaced.
 *  Thread Starter [Gone Fishin](https://wordpress.org/support/users/terryg-1/)
 * (@terryg-1)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-deprecated-function-eregi-is-deprecated/#post-4773703)
 * Thanks Scott. Updated 🙂
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-deprecated-function-eregi-is-deprecated/#post-4773712)
 * You’re welcome terry.g! 🙂 Thanks for bringing the issue to my attention in the
   first place. Take care.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘PHP Deprecated: Function eregi() is deprecated’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-spamshield_08293a.svg)
 * [WP-SpamShield](https://wordpress.org/plugins/wp-spamshield/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-spamshield/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-spamshield/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-spamshield/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-spamshield/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-spamshield/reviews/)

## Tags

 * [PHP Deprecated](https://wordpress.org/support/topic-tag/php-deprecated/)

 * 7 replies
 * 2 participants
 * Last reply from: [redsand](https://wordpress.org/support/users/redsand/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/php-deprecated-function-eregi-is-deprecated/#post-4773712)
 * Status: resolved