3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('Europe/Berlin'); $date = "15.11.2015"; $format_in = '%d.%m.%Y'; $format_out = "%s"; $date_array = strptime($date, $format_in); print_r($date_array); extract($date_array, EXTR_PREFIX_SAME, "wddx"); $timestamp = date("U", mktime($tm_hour, $tm_min, $tm_sec, $tm_mon, $tm_mday, $tm_year)); echo "$timestamp\n"; ?>
based on n1UAi
Output for 5.5.0 - 5.5.24, 5.6.0 - 5.6.8, 5.6.15 - 7.2.0
Array ( [tm_sec] => 0 [tm_min] => 0 [tm_hour] => 0 [tm_mday] => 15 [tm_mon] => 10 [tm_year] => 115 [tm_wday] => 0 [tm_yday] => 318 [unparsed] => ) -58513366800
Output for 5.5.25 - 5.5.38, 5.6.9 - 5.6.14
Array ( [tm_sec] => 0 [tm_min] => 0 [tm_hour] => 0 [tm_mday] => 15 [tm_mon] => 10 [tm_year] => 115 [tm_wday] => 0 [tm_yday] => 318 [unparsed] => ) -58513366408