Pedro's blog: db2, mysql, php, linux and performance


Function ereg() is deprecated in…
23/05/2011, 20:16
Filed under: Apache,GNU/Linux,PHP

I just update the php of one of the servers I’m handling on and I got a surprise… every f*cking ereg() or eregi() function was displaying a pretty sentence:

Function ereg() is deprecated in…

How to disable this annoying warnings?
Fast solution:go to the php.ini file and add an ~E_DEPRECATED on the error_reporting var like:

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED

Best solution:use preg_match() instead

Enjoy!




1 Comment so far
Leave a comment

Hi
Thanks for the sollution it help a lot

   Brahim 09.27.15 @ 14:20



Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



¡IMPORTANTE! Responde a la pregunta: ¿Cuál es el valor de 13 15 ?