src/Utilities/Arrays.php
public static function areKeysInArray(array $keys, array $array, $explicit = true)
    {
        $result = false;

        if (!empty($array)) {
            $firstKey = true;

            foreach ($keys as $key) {
                $exists = array_key_exists($key, $array);

                if ($firstKey) {
                    $result = $exists;
                    $firstKey = false;
                } elseif ($explicit) {
                    $result = $result && $exists;

                    if (!$result) {
                        break;
                    }
                } else {
                    $result = $result || $exists;

                    if ($result) {
                        break;
                    }
                }
            }
        }

        return $result;
    }
public static function areKeysInArray(array $keys, array $array, $explicit = true)
    {
        $result = false;

        if (!empty($array)) {
            $firstKey = true;

            foreach ($keys as $key) {
                $exists = array_key_exists($key, $array);

                if ($firstKey) {
                    $result = $exists;
                    $firstKey = false;
                } elseif ($explicit) {
                    $result = $result && $exists;

                    if (!$result) {
                        break;
                    }
                } else {
                    $result = $result || $exists;

                    if ($result) {
                        break;
                    }
                }
            }
        }

        return $result;
    }
public static function areKeysInArray ( array $ keys , array $ array , $ explicit = true ) { $ result = false ; if ( ! empty ( $ array ) ) { $ firstKey = true ; foreach ( $ keys as $ key ) { $ exists = array_key_exists ( $ key , $ array ) ; if ( $ firstKey ) { $ result = $ exists ; $ firstKey = false ; } elseif ( $ explicit ) { $ result = $ result && $ exists ; if ( ! $ result ) { break ; } } else { $ result = $ result || $ exists ; if ( $ result ) { break ; } } } } return $ result ; }
Returns information if given keys exist in given array

@param array $keys     The keys to find
@param array $array    The array that maybe contains keys
@param bool  $explicit (optional) If is set to true, all keys should exist in given array. Otherwise - not all.
@return bool
Returns information if given keys exist in given array