Pure php bubble sort algorithm