Menu

#6 Deprecated: Function eregi() is deprecated

open
nobody
None
5
2010-05-20
2010-05-20
No

Using PHP5, I get a lot of errors/warnings like this:

Deprecated: Function eregi() is deprecated in /var/www/index.php on line 80

Deprecated: Function eregi() is deprecated in /var/www/index.php on line 87

Deprecated: Function eregi() is deprecated in /var/www/index.php on line 97
[...]

In PHP 5, the POSIX Regular Expression functions (ie. eregi() and the like) became depracted.

The attached patch replaces all these eregi() functions with preg_match() and stripos(), so that no further depreciation warnings are shown.

Discussion

  • Alexander Skwar

    Alexander Skwar - 2010-05-20

    split() is also deprecated in PHP 5.3.x. Going to upload a new patch.

     
  • Alexander Skwar

    Alexander Skwar - 2010-05-20

    Replace eregi() & split() with stripos() and preg_match() in phpLicenseWatcher 1.9.1

     

Log in to post a comment.

MongoDB Logo MongoDB