array_diff_ukey

PHP 5 >= 5.1.0, PHP 7, PHP 8
array_diff_ukey - Computes the difference of arrays using a callback function on the keys for comparison
Manual
Code Examples

Example #1 array_diff_ukey example

Result: array(2) { ["red"]=> int(2) ["purple"]=> int(4) }
PHP Version: