$a = [
1234576,
2456901,
1234598,
2456776,
2456993,
1234567,
1234555,
3245089
];
$len = 4;
for($i = 0, $j = count($a)-1, $k = ceil(count($a)/2); $i < $k; $i++, $j--) {
$group[substr($a[$i], 0, $len)][] = $a[$i];
$group[substr($a[$j], 0, $len)][] = $a[$j];
}
print_r($group);
print_r(array_values($group));