echo $res = `find /var/www/html/Test -maxdepth 1 -name "test*" -daystart -mtime 0 -ls`;
//0 means from today , so for example 1 means 1 day old
$main_array = (explode(PHP_EOL,$res));
//print_r($main_array);
$main_array = array_map(function($arr){ $a = explode("/", $arr, 2); return $a[1]; }, $main_array);
//print_r($main_array);
$main_array = array_map(function($arr){ $a = explode("/", $arr); $size = sizeof($a) - 1; return $a[$size]; }, $main_array);
$cmd = "tar -zcvf test-".date(Ymd).".tgz ";
$files = implode(" ", $main_array);
$rese = `$cmd.$files`;
//echo "==>".$cmd.$files;