syntaxgmmktime(hour,minute,second,month,day,year,is_dst);
parametershour − specifies the hour.
minute − specifies the minute
second − specifies the second
month − specifies the month
day − specifies the day
year − specifies the year
is_dst − parameters always represent a gmt date so is_dst doesn't influence the result.
returnthe gmmktime() function returns a integer unix timestamp.
examplethe following is an example −
live demo
<?php $time = gmmktime(0,0,0,9,10,2017); print($time . "
");?>
output1505001600
示例让我们看另一个例子 −
实时演示
<?php echo "nov 10, 2017 was on a ".date("l", gmmktime(0,0,0,11,10,2017));?>
outputnov 10, 2017 was on a friday
以上就是在php中的gmmktime()函数的详细内容。