Function ereg() is deprecated

"Deprecated" means that PHP 5.3.0 no longer supports that function.

You should treat ereg() as not existing anymore.

The function does still exist, but only to support existing applications where it's been used.

When writing new code, never use a deprecated function.

Instead, consider the preg_match function.


Deprecated means this function will eventually be removed from PHP in a future version. You should no longer rely on it in your code and instead use the suggested alternative.

In case of PHP's ereg, heed the notice in the PHP Manual:

As of PHP 5.3.0, the regex extension is deprecated in favor of the PCRE extension. Calling this function will issue an E_DEPRECATED notice. See the list of differences for help on converting to PCRE.

Also see the description of E_DEPRECATED in the PHP Manual.
For all deprecated features in PHP5.3, see Deprecated features in PHP 5.3.x.
For more general information see the Wikipedia article on Deprecation in Software

Tags:

Php

Regex