array_intersect_ukey

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

Example #1 array_intersect_ukey example

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