public static function isUri($strarg)
    {
        $returnValue = (bool) false;
        $uri = trim($strarg);
        if(!empty($uri)){
        	if( (preg_match("/^(http|https|file|ftp):\/\/[\/:.A-Za-z0-9_-]+#[A-Za-z0-9_-]+$/", $uri) && strpos($uri,'#')>0) || strpos($uri,"#")===0){
        		$returnValue = true;
        	}
        }
        return (bool) $returnValue;
    }
public static function isUri($strarg)
    {
        $returnValue = (bool) false;
        $uri = trim($strarg);
        if(!empty($uri)){
        	if( (preg_match("/^(http|https|file|ftp):\/\/[\/:.A-Za-z0-9_-]+#[A-Za-z0-9_-]+$/", $uri) && strpos($uri,'#')>0) || strpos($uri,"#")===0){
        		$returnValue = true;
        	}
        }
        return (bool) $returnValue;
    }
public static function isUri ( $ strarg ) { $ returnValue = ( bool ) false ; $ uri = trim ( $ strarg ) ; if ( ! empty ( $ uri ) ) { if ( ( preg_match ( "/^(http|https|file|ftp):\/\/[\/:.A-Za-z0-9_-]+#[A-Za-z0-9_-]+$/" , $ uri ) && strpos ( $ uri , '#' ) > 0 ) || strpos ( $ uri , "#" ) === 0 ) { $ returnValue = true ; } } return ( bool ) $ returnValue ; }
Check if the given string is a proper uri

@access public
@author Joel Bout, <joel@taotesting.com>
@param  string strarg
@return boolean
Check if the given string is a proper uri