<?php

$text = "a b c";
$replacement = array("a b(?! c\b)" => "ab","b c" => "bc");
$search = array_map(function($v){
    return preg_quote($v, "/");
}, array_keys($replacement));

echo $text = preg_replace_callback("/\b(" . implode("|", $search) . ")\b/", function($m)use($replacement){
    return $replacement[$m[1]];
}, $text);