--TEST-- Test gmstrftime() function : usage variation - Passing time related format strings to format argument. --FILE-- "%H", 'Hour as decimal by 12-hour format' => "%I", 'Minute as decimal number' => "%M", 'AM/PM format for a time' => "%p", 'Second as decimal number' => "%S", ); // loop through each element of the array for timestamp foreach($inputs as $key =>$value) { echo "\n--$key--\n"; var_dump( gmstrftime($value) ); var_dump( gmstrftime($value, $timestamp) ); }; ?> --EXPECTF-- *** Testing gmstrftime() : usage variation *** --Hour as decimal by 24-hour format-- Deprecated: Function gmstrftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "%d" Deprecated: Function gmstrftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "08" --Hour as decimal by 12-hour format-- Deprecated: Function gmstrftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "%d" Deprecated: Function gmstrftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "08" --Minute as decimal number-- Deprecated: Function gmstrftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(%d) "%d" Deprecated: Function gmstrftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "08" --AM/PM format for a time-- Deprecated: Function gmstrftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "%s" Deprecated: Function gmstrftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "AM" --Second as decimal number-- Deprecated: Function gmstrftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(%d) "%d" Deprecated: Function gmstrftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "08"