This example shows common methods to get a timestamp from $year,$month,$day variables.
strtotime() with implode() seems to be the fastest way (performance wise..)
<?php
function logTime($start,$end,$functionName){
echo "$functionName() = ".(float)($end-$start)*(60*60)."<br>";
}
$day = '01'; $month = '01'; $year = '2000';
$time = array();
$timestamps = array();
$time[] = array(microtime(true),'start');
$timestamps[] = mktime(0,0,0,$month,$day,$year);
$time[] = array(microtime(true),'mktime');
$timestamps[] = strtotime($year.'-'.$month.'-'.$day);
$time[] = array(microtime(true),'strtotime');
$timestamps[] = strtotime(implode('-', array($year, $month, $day)));
$time[] = array(microtime(true),'strtotime_Array');
$timestamps[] = date_create_from_format('!Y-m-d', $year.'-'.$month.'-'.$day)->getTimestamp();
$time[] = array(microtime(true),'date_create_from_format');
$timestamps[] = date_create_from_format('!Y-m-d', implode('-', array($year, $month, $day)))->getTimestamp();
$time[] = array(microtime(true),'date_create_from_format_Array');
$timestamps[] = DateTime::createFromFormat('!Y-m-d', $year.'-'.$month.'-'.$day)->getTimestamp();
$time[] = array(microtime(true),'DateTime');
$timestamps[] = DateTime::createFromFormat('!Y-m-d', implode('-', array($year, $month, $day)))->getTimestamp();
$time[] = array(microtime(true),'DateTime_Array');
foreach ($time as $key=>$value) {
if(end($time) == $value){}else{
logTime($value[0],$time[$key+1][0],$time[$key+1][1]);
}
}
var_dump($timestamps);
?>