有官方函数可以直接干这个事情啊... 随手写大概是这个样子的:
array_intersect_uassoc($a, $b, function($ka, $kb) { if( preg_match("%$ka%i", $kb) ) return 0; return $ka - $kb; });