array_diff_key

PHP 5 >= 5.1.0, PHP 7, PHP 8
array_diff_key - Computes the difference of arrays using keys for comparison

Example #1 array_diff_key example

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


Example #2 of array_diff_key

PHP Version:


Function array_diff_key:

Arrays Functions

Most used PHP functions