So if you are unfortunate enough to be stuck with PHP < 5.2.4

then you can use the following to colour keywords blue, but NOT if they occur
after // comment delimiters:
PHP Code:
function onlyWholeWords(&$value, $key) {
$value = "/^((?:(?!\/\/).)*)\b" . $value . "\b/";
}
function addSpan(&$value, $key) {
$value = "$1<span style='color:blue'>" . $value . "</span>";
}
function codeWords($code) {
$words = array('break', 'case', 'class', 'continue', 'default', 'do', 'elif',
'else', 'for', 'function', 'if',
'new', 'null', 'return', 'self', 'switch', 'this', 'typeof',
'var', 'void', 'while', 'with');
$words2 = $words;
array_walk($words, 'onlyWholeWords');
array_walk($words2, 'addSpan');
$code = preg_replace($words, $words2, $code);
return $code;
}