How to search for small file in directory

Hello,
There are files with no extensions in the directory with timestamps
Sample

1635669909
1635669909-guncellendi
1635672185
1635672185-guncellendi
1635678787-proje
1635583966-onaylandi
1635921944
1635922104
1635924480

My code is below
I am using pagination
I’m searching for files

How do I look for a less than “< 1635678787” here with timestamp?

if(!empty($_POST['query'])) {
    $query = $_POST['query'];
}else{
    $query = "";
}

if(!empty($_POST['date'])) {
    $date = $_POST['date'];
}else{
    $date = "";
}

$files = glob("../".DIR."/*[!index.html]$query*", GLOB_BRACE); // How is it applied here? "< 1635678787"
$selectedFiles = array_slice($files, $start, $limit);

foreach($selectedFiles as $file) {
	$file = pathinfo($file);
	$dosya_dizi[] = $file['filename'];
}

From here I get the total number of files for pagination

$files = glob("../".DIR."/*[!index.html]$query*", GLOB_BRACE);
$total_file_for_pagination = count($files);
Sponsor our Newsletter | Privacy Policy | Terms of Service