Wouldn't something like `array_intersect();` work as well?