Symfony 1.4 出现错误Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /vagrant/lib/util/sfToolkit.class.php on line 365
相关功能如下:
public static function pregtr($search, $replacePairs)
{
if(strpos(implode(', ', $replacePairs),'e') > 0)
print_r($replacePairs);
return preg_replace(array_keys($replacePairs),array_values($replacePairs), $search);
}
相关的价值观是:
Array
(
[#/(.?)#e] => '::'.strtoupper('\1')
[/(^|_|-)+(.)/e] => strtoupper('\2')
)
如何将其更改为等效的使用preg_replace_callback
?