There is another problem: the array_intersect_key documentation doesn't guarantee to keep the order of the first element. There is only a comment that says that this is probably the case. But someone could implement this different and if this: https://bugs.php.net/bug.php?id=60836 gets implemented the order would be messed up. we need to keep the order.