move preg_replace to preg_replace_callback
Merge pull request #650 from lunika/preg_replace_deprecated

move preg_replace to preg_replace_callback