1--TEST-- 2Test gmdate() function : usage variation - Passing Full Date/Time format options to format argument. 3--FILE-- 4<?php 5echo "*** Testing gmdate() : usage variation ***\n"; 6 7// Initialise all required variables 8date_default_timezone_set('UTC'); 9$timestamp = mktime(8, 8, 8, 8, 8, 2008); 10 11echo "\n-- Testing gmdate() function with ISO 8601 date format --\n"; 12var_dump( gmdate('c') ); 13var_dump( gmdate('c', $timestamp) ); 14 15echo "\n-- Testing gmdate() function with RFC 2822 date format --\n"; 16var_dump( gmdate('r') ); 17var_dump( gmdate('r', $timestamp) ); 18 19echo "\n-- Testing gmdate() function with seconds since Unix Epoch format --\n"; 20var_dump( gmdate('U') ); 21var_dump( gmdate('U', $timestamp) ); 22 23?> 24--EXPECTF-- 25*** Testing gmdate() : usage variation *** 26 27-- Testing gmdate() function with ISO 8601 date format -- 28string(%d) "%s" 29string(25) "2008-08-08T08:08:08+00:00" 30 31-- Testing gmdate() function with RFC 2822 date format -- 32string(%d) "%s" 33string(31) "Fri, 08 Aug 2008 08:08:08 +0000" 34 35-- Testing gmdate() function with seconds since Unix Epoch format -- 36string(%d) "%d" 37string(10) "1218182888" 38