public static function excerpt($text, $phrase, $radius = 100, $ending = "...") {
		$phrases = is_array($phrase) ? $phrase : array(
			$phrase 
		);
		
		$phraseLen = strlen(implode(' ', $phrases));
		if($radius < $phraseLen) {
			$radius = $phraseLen;
		}
		
		foreach($phrases as $phrase) {
			$pos = strpos(strtolower($text), strtolower($phrase));
			if($pos > -1)
				break;
		}
		
		$startPos = 0;
		if($pos > $radius) {
			$startPos = $pos - $radius;
		}
		
		$textLen = strlen($text);
		
		$endPos = $pos + $phraseLen + $radius;
		if($endPos >= $textLen) {
			$endPos = $textLen;
		}
		
		$excerpt = substr($text, $startPos, $endPos - $startPos);
		if($startPos != 0) {
			$excerpt = substr_replace($excerpt, $ending, 0, $phraseLen);
		}
		
		if($endPos != $textLen) {
			$excerpt = substr_replace($excerpt, $ending, -$phraseLen);
		}
		
		return $excerpt;
	}