original_string: public static function active( $url )
  	{
  		$url = parse_url( $url, PHP_URL_PATH );
  
  		if ( empty( $url ) )
  		{
  			return false;
  		}
  
  		if ( $url[0] !== '/' )
  		{
  			$url = static::to( $url );
  		}
  
  		// when we are on "/" only "/" counts as active.
  	 	if ( $url === '/' )
  		{
  			return static::current() == $url;
  		}
  
  		// for everything else we cut the url and compare
  		$cut = substr( static::current(), 0, strlen( $url ) );
  
  		return $cut == $url;
  	}
code: public static function active( $url )
  	{
  		$url = parse_url( $url, PHP_URL_PATH );
  
  		if ( empty( $url ) )
  		{
  			return false;
  		}
  
  		if ( $url[0] !== '/' )
  		{
  			$url = static::to( $url );
  		}
  
  		// when we are on "/" only "/" counts as active.
  	 	if ( $url === '/' )
  		{
  			return static::current() == $url;
  		}
  
  		// for everything else we cut the url and compare
  		$cut = substr( static::current(), 0, strlen( $url ) );
  
  		return $cut == $url;
  	}
code_tokens: public static function active ( $ url ) { $ url = parse_url ( $ url , PHP_URL_PATH ) ; if ( empty ( $ url ) ) { return false ; } if ( $ url [ 0 ] !== '/' ) { $ url = static :: to ( $ url ) ; } // when we are on "/" only "/" counts as active. if ( $ url === '/' ) { return static :: current ( ) == $ url ; } // for everything else we cut the url and compare $ cut = substr ( static :: current ( ) , 0 , strlen ( $ url ) ) ; return $ cut == $ url ; }
docstring: Is the given url active?
  This function ignores the domain and the parameters if the
  uri matches the current uri true will be returned.
  
  @param string 		$url
  @return bool
docstring_tokens: Is the given url active? This function ignores the domain and the parameters if the uri matches the current uri true will be returned .