Array Sort Algorithms PHP