Automattic\WooCommerce\Utilities

ArrayUtil::deep_assoc_array_diff()public staticWC 1.0

Computes difference between two assoc arrays recursively. Similar to PHP's native assoc_array_diff, but also supports nested arrays.

Метод класса: ArrayUtil{}

Хуков нет.

Возвращает

Массив. The difference between the two arrays.

Использование

$result = ArrayUtil::deep_assoc_array_diff( $array1, $array2, $strict ): array;
$array1(массив) (обязательный)
First array.
$array2(массив) (обязательный)
Second array.
$strict(true|false)
Whether to also match type of values.
По умолчанию: true

Код ArrayUtil::deep_assoc_array_diff() WC 8.7.0

public static function deep_assoc_array_diff( array $array1, array $array2, bool $strict = true ): array {
	return self::deep_compute_or_compare_array_diff( $array1, $array2, false, $strict );
}