public function bestMatch(array $mimeTypes, array $acceptable) {
        $maxQ = 0;
        $match = false;

        foreach ($mimeTypes as $mime) {
            if (($q = $this->isAcceptable($mime, $acceptable)) && ($q > $maxQ)) {
                $maxQ = $q;
                $match = $mime;
            }
        }

        return $match;
    }
public function bestMatch(array $mimeTypes, array $acceptable) {
        $maxQ = 0;
        $match = false;

        foreach ($mimeTypes as $mime) {
            if (($q = $this->isAcceptable($mime, $acceptable)) && ($q > $maxQ)) {
                $maxQ = $q;
                $match = $mime;
            }
        }

        return $match;
    }
public function bestMatch ( array $ mimeTypes , array $ acceptable ) { $ maxQ = 0 ; $ match = false ; foreach ( $ mimeTypes as $ mime ) { if ( ( $ q = $ this -> isAcceptable ( $ mime , $ acceptable ) ) && ( $ q > $ maxQ ) ) { $ maxQ = $ q ; $ match = $ mime ; } } return $ match ; }
Pick the best match from a set of mime types matched against acceptable types

@param array $mimeTypes The mime types to find the best match from
@param array $acceptable Acceptable types to match against
@return boolean|string Returns false if none of the $mimetypes are acceptable or the best
match on success
Pick the best match from a set of mime types matched against acceptable types