--TEST-- Test strftime() 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( strftime($value) ); var_dump( strftime($value, $timestamp) ); }; ?> --EXPECTF-- *** Testing strftime() : usage variation *** --Hour as decimal by 24-hour format-- Deprecated: Function strftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(%d) "%d" Deprecated: Function strftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "18" --Hour as decimal by 12-hour format-- Deprecated: Function strftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(%d) "%d" Deprecated: Function strftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "06" --Minute as decimal number-- Deprecated: Function strftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(%d) "%d" Deprecated: Function strftime() 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 strftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(%d) "%s" Deprecated: Function strftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "PM" --Second as decimal number-- Deprecated: Function strftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(%d) "%d" Deprecated: Function strftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in %s on line %d string(2) "08"