public function hasUrl($string)
    {
        $result = false;
        $words = $this->getWords($string);

        foreach ($words as $word) {
            if (preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i", $word)) {
                $result = true;
            }
        }

        return $result;
    }
public function hasUrl($string)
    {
        $result = false;
        $words = $this->getWords($string);

        foreach ($words as $word) {
            if (preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i", $word)) {
                $result = true;
            }
        }

        return $result;
    }
public function hasUrl ( $ string ) { $ result = false ; $ words = $ this -> getWords ( $ string ) ; foreach ( $ words as $ word ) { if ( preg_match ( "/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i" , $ word ) ) { $ result = true ; } } return $ result ; }
Checks if string has a url.

@param string $string

@return bool
Checks if string has a url .