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{}

No Hooks.

Return

true|false. Whether the arrays are different.

Usage

$result = ArrayUtil::deep_compare_array_diff( $array1, $array2, $strict );
$array1(array) (required)
First array to compare.
$array2(array) (required)
Second array to compare.
$strict(true|false)
Whether to use strict comparison.
Default: true

Code of ArrayUtil::deep_compare_array_diff() WC 7.1.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 );
}