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.

Method of the class: 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

ArrayUtil::deep_compare_array_diff() code WC 9.3.3

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 );
}