<?php
$text = 'Я очень проголодался, не против бы пойти в столовую.';
$words = [
'проголодался' => 'site1.com',
'пойти в столовую' => 'site2.com'
];

$patterns = array_map(function($v) {
  return '#(' . $v . '\b)#iu';
}, array_keys($words));

$replacements = array_map(function($v) {
  return '<a href="' . $v . '">\1</a>';
}, array_values($words));

$text = preg_replace($patterns, $replacements, $text);

echo $text;