public static function filterBykey($array, $callback)
	{
		$filtered = array();
		
		// if $array and $callback are given
		if ($array !== null && $callback !== null) {
			// if the input arr is actually an arr
			if (is_array($array)) {
				// if $callback is callable
				if (is_callable($callback)) {
					// if $array is not empty
					if ( ! empty($array)) {
						// if there are keys that pass the filter
						$keys = array_filter(array_keys($array), $callback);
						if ( ! empty($keys)) {
							$filtered = array_intersect_key($array, array_flip($keys));
						}
					}
				} else {
					throw new \InvalidArgumentException(
						__METHOD__."() expects parameter two to be a callable function"
					);
				}
			} else {
				throw new \InvalidArgumentException(
					__METHOD__."() expects paramater one to be an array"
				);
			}
		} else {
			throw new \BadMethodCallException(
				__METHOD__."() expects two parameters, an array and a callable function"
			);
		}

		return $filtered;
	}