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.

Method of the class: ArrayUtil{}

No Hooks.


Array. The difference between the two arrays.


$result = ArrayUtil::deep_assoc_array_diff( $array1, $array2, $strict ): array;
$array1(array) (required)
First array.
$array2(array) (required)
Second array.
Whether to also match type of values.
Default: true

ArrayUtil::deep_assoc_array_diff() code WC 8.9.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 );