PHP offers two different types of regex matching functions, preg and ereg. ereg is substantially slower and is also slated for removal in PHP6. It would be wise to standardize on preg_* functions as they're faster, makes reading the code easier, and aren't deprecated.

There's already an issue seeking to update the ereg_* calls to preg_* calls and it should be worked on if this becomes a coding standard:
#64967: Replace ereg with preg

Comments

heather’s picture

Component: Coding standards » New documentation

Changed the component to reflect the new component categorization. See http://drupal.org/node/301443

Dries’s picture

[#64967: Replace ereg with preg] was committed to CVS HEAD. We should probably add a note to the upgrade instructions.

dawehner’s picture

Status: Active » Fixed

this not was written here: http://drupal.org/node/224333#preg_match

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.