“ereg” & “eregi” has been deprecated in PHP 5.3 and PHP 6.x

October 7th, 2009 Categories: Developement, PHP


I was working on a new PHP script when I needed to remove some characters from a random string. Generall I would use ereg, or even eregi (if the string has both upper and lower case. But since the string had some non-alphabetical characters, I had to check on the syntac in the PHP manual to see how to remove them.

But then I noticed that both ereg & eregi has been DEPRECATED, or REMOVED from PHP 5.3 & PHP 6.x

Warning
This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.

Now I can’t finish the project until I find a good substitute…….

Tags: , , , ,
No comments yet.
You must be logged in to post a comment.