ereg_replace — Replace regular expression
(在PHP 4, PHP 5中)
这个函数在PHP 5.3.0 中就已经不赞成使用,并在 PHP 7.0.0.中被移除
string ereg_replace ( string $pattern , string $replacement , string $string )
查看更多 http://php.net/manual/en/function.ereg-replace.php
preg_replace — Perform a regular expression search and replace
(在PHP 4, PHP 5, PHP 7中)
mixed preg_replace ( mixed $pattern , mixed $replacement , mixed $subject [, int $limit = -1 [, int &$count ]] )
查看更多 http://php.net/manual/en/function.preg-replace.php
在PHP 7.0.0中ereg_replace 函数可使用preg_replace代替,只是将ereg_replace中的$pattern两边加上”/“以闭合如"/pattern/"。


