@@ -316,6 +316,54 @@ public static function expand(iterable $array): array
316316 return BaseContainer::instance ()->get (ArrInterface::class)->expand ($ array );
317317 }
318318
319+ /**
320+ * Returns a new array that checks the original for all elements with the keys listed in $keys.
321+ *
322+ * Возвращает новый массив, исключая из исходного все элементы с ключами, перечисленными в $keys.
323+ */
324+ public static function except (array $ array , array |string $ keys ): array
325+ {
326+ if (self ::$ replace ) {
327+ return self ::$ replace ->except ($ array , $ keys );
328+ }
329+
330+ return BaseContainer::instance ()->get (ArrInterface::class)->except ($ array , $ keys );
331+ }
332+
333+ /**
334+ * Returns an array that contains only the matching values from $values.
335+ *
336+ * Возвращает массив, в котором оставлены только совпавшие значения из $values.
337+ *
338+ * @param bool $strict - strict comparison when searching for matches.
339+ * - строгое сравнение при поиске совпадений.
340+ */
341+ public static function onlyValues (array $ array , array $ values , bool $ strict = false ): array
342+ {
343+ if (self ::$ replace ) {
344+ return self ::$ replace ->onlyValues ($ array , $ values , $ strict );
345+ }
346+
347+ return BaseContainer::instance ()->get (ArrInterface::class)->onlyValues ($ array , $ values , $ strict );
348+ }
349+
350+ /**
351+ * Returns an array excluding all values from $values.
352+ *
353+ * Возвращает массив, в котором исключены все значения из $values.
354+ *
355+ * @param bool $strict - strict comparison when searching for matches.
356+ * - строгое сравнение при поиске совпадений.
357+ */
358+ public static function exceptValues (array $ array , array $ values , bool $ strict = false ): array
359+ {
360+ if (self ::$ replace ) {
361+ return self ::$ replace ->exceptValues ($ array , $ values , $ strict );
362+ }
363+
364+ return BaseContainer::instance ()->get (ArrInterface::class)->exceptValues ($ array , $ values , $ strict );
365+ }
366+
319367 /**
320368 * @internal
321369 *
0 commit comments