Given that the function strptime()
does not work for Windows and strtotime()
can return unexpected results, I recommend using date_parse_from_format()
:
$date = date_parse_from_format('d-m-Y', '22-09-2008');
$timestamp = mktime(0, 0, 0, $date['month'], $date['day'], $date['year']);