PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $timestamps = array(); for ($i = 0; $i < 5000; $i++) { $timestamps[] = mt_rand(strtotime('1900-01-01 00:00:00 am'), strtotime('2100-12-31 11:59:59 pm')); } $mapped = array_map( function($t) { return [strtotime(date('H:i:s', $t)), strtotime(date('Y-m-d h:i:s a', $t))]; }, $timestamps ); $res = array_column($mapped, 1, 0); echo $res[max(array_keys($res))];
Show:  
Copy Clear