PHP: Find max key which is smaller or equal than a given value [duplicate]

I have a multidimensional array which uses dates in the form of yyyy-mm-dd as its key.
What is the most efficient way of finding the max key that is <= to a given value?

$array (
"2023-01-01" => array (),
"2023-07-25" => array (),
"2023-08-03" => array (),
"2023-09-07" => array (),
)

For example: given the date 2023-08-16, how could I find 2023-08-03 (the max date which is smaller or equal to 2023-08-16)?