public static function exists($arrayOrArrayAccess, $keyOrOffset)
    {
        if ($arrayOrArrayAccess instanceof ArrayAccess) {
            return $arrayOrArrayAccess->offsetExists($keyOrOffset);
        }

        return array_key_exists($keyOrOffset, $arrayOrArrayAccess);
    }
public static function exists($arrayOrArrayAccess, $keyOrOffset)
    {
        if ($arrayOrArrayAccess instanceof ArrayAccess) {
            return $arrayOrArrayAccess->offsetExists($keyOrOffset);
        }

        return array_key_exists($keyOrOffset, $arrayOrArrayAccess);
    }
public static function exists ( $ arrayOrArrayAccess , $ keyOrOffset ) { if ( $ arrayOrArrayAccess instanceof ArrayAccess ) { return $ arrayOrArrayAccess -> offsetExists ( $ keyOrOffset ) ; } return array_key_exists ( $ keyOrOffset , $ arrayOrArrayAccess ) ; }
Check if the given key or offset exists in the provided array
or array object.

@param ArrayAccess|array $arrayOrArrayAccess Subject Array or object
@param string|int $keyOrOffset Key to find.

@return bool
Check if the given key or offset exists in the provided array or array object .