public static function keysExist(array $collection, array $keys)
    {
        $collection = array_flip($collection);

        foreach ($keys as $key) {
            if (!in_array($key, $collection)) {
                return false;
            }
        }

        return true;
    }
public static function keysExist(array $collection, array $keys)
    {
        $collection = array_flip($collection);

        foreach ($keys as $key) {
            if (!in_array($key, $collection)) {
                return false;
            }
        }

        return true;
    }
public static function keysExist ( array $ collection , array $ keys ) { $ collection = array_flip ( $ collection ) ; foreach ( $ keys as $ key ) { if ( ! in_array ( $ key , $ collection ) ) { return false ; } } return true ; }
Determines whether all keys exist in a collection

@param array $collection
@param array $keys Keys to be checked for existence
@return boolean
Determines whether all keys exist in a collection