You should have a test then that checks the order. ;-) In my opinion you should leave this as it is, except it turns out to be a bottleneck (50+ ms). The PHP function will never mess the order. This would break a million apps and instantly be reverted. ;-)