I have on my linux machine such folder tree structure:  

`/dir/yyyy/mm/dd/HH`  

e.g.:  

`/dir/2014/03/01/08`  

`/dir/2014/03/20/09`  

`/dir/2014/03/01/10`  

`/dir/2014/08/01/10`  

`/dir/2014/12/15/10`  

`/dir/2015/01/01/14`

I'd like to get in php what path is the oldest, like this:  

The oldest path is: `2014-03-01 08`  

The newest path is: `2015-01-01 14`

How it can be done?