Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
Arr::keys_exists($keys, $array)
class Arr extends Kohana_Arr {
* Checks that keys exists in the array.
* Keys, not key (singular), as built-in function does.
* @param array The array of keys
* @param array The array to check
* @return boolean Does all keys exists in the array?
static function keys_exists(array $keys, array $array) {
foreach ($keys as $key) {
if (array_key_exists($key, $array) === false) {
return false;
return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.