0
在下面的代碼片段preg_replace_callback,回調的返回值不更換匹配的字符串
爲什麼不酒吧更換富?
$subject = "Hello foo";
preg_replace_callback(
'/\bfoo\b/i',
function ($match)
{
return 'bar';
},
$subject
);
echo $subject;