PHP gmmktime() function

PHP gmdate() function
PHP gmstrftime() Function

What is the syntax of the gmmktime() function in PHP?

gmmktime(hour, minute, second, month, day, year, is_dst)
hourOptional. Specifies the hour
minuteOptional. Specifies the minute
secondOptional. Specifies the second
monthOptional. Specifies the month
dayOptional. Specifies the day
yearOptional. Specifies the year
is_dstOptional. Parameters always represent a GMT date so is_dst doesn’t influence the result. Note: This parameter is removed in PHP 7.0. The new timezone handling features should be used instead

Examples of the gmmktime() function

Example 1. In this example,

// Prints: October 3, 1975 was on a Friday
echo "Oct 3, 1975 was on a ".date("l", gmmktime(0,0,0,10,3,1975));
PHP gmdate() function
PHP gmstrftime() Function

Add comment

Tutor Network

Share this

Learn PHP from A to Z