Automattic\WooCommerce\Utilities
ArrayUtil::deep_compare_array_diff
Returns whether two assoc array are same. The comparison is done recursively by keys, and the functions returns on first difference found.
Метод класса: ArrayUtil{}
Хуков нет.
Возвращает
bool. 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() ArrayUtil::deep compare array diff WC 11.3.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 );
}