Automattic\WooCommerce\Utilities

ArrayUtil::deep_compare_array_diff()public staticWC 1.0

Returns whether two assoc array are same. The comparison is done recursively by keys, and the functions returns on first difference found.

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

Хуков нет.

Возвращает

true|false. Whether the arrays are different.

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

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

Код ArrayUtil::deep_compare_array_diff() WC 8.7.0

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