About Brendan Carr

A Leading Technology Company that offers Web & IT Services in the Fraser Valley - Mission, Abbotsford, and Langley.

ereg, eregi, ereg_replace is Deprecated

Since upgrading to PHP 5.3, there has been a lot of deprecated code that I’ve had to fix. Another of these is the family of ereg() eregi() and ereg_replace() – all of which can be replaced by preg_match(). While searching how to fix it, I came across a few sites that all gave similar results. An example of some deprecated code would be: ereg(‘.([^.]*$)’, $this->src_name, $variable); […]

By | May 23rd, 2012|Support Articles|0 Comments