As you use numeric indexes in the data array, $data[0] would be faster than shift/unshift