Bubble Sort implementation in PHP