phpposix-ere

Why is `ereg` deprecated in PHP?


Why is ereg deprecated in PHP?

I had a lot of functions which used this, now they always give warning.

What is the alternative of this too?


Solution

  • http://pl.php.net/manual/en/function.ereg.php

    Note: 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.