1--TEST-- 2Test gmdate() function : usage variation - Passing textual representation of day formats. 3--FILE-- 4<?php 5/* Prototype : string gmdate(string format [, long timestamp]) 6 * Description: Format a GMT date/time 7 * Source code: ext/date/php_date.c 8 * Alias to functions: 9 */ 10 11echo "*** Testing gmdate() : usage variation ***\n"; 12 13// Initialise all required variables 14date_default_timezone_set('UTC'); 15$timestamp = mktime(8, 8, 8, 8, 8, 2008); 16 17echo "\n-- Testing gmdate() function with partial textual representation of day --\n"; 18var_dump( gmdate('D') ); 19var_dump( gmdate('D', $timestamp) ); 20 21echo "\n-- Testing gmdate() function with full textual representation of day --\n"; 22var_dump( gmdate('l') ); 23var_dump( gmdate('l', $timestamp) ); 24 25echo "\n-- Testing gmdate() function with English ordinal suffix --\n"; 26var_dump( gmdate('S') ); 27var_dump( gmdate('S', $timestamp) ); 28 29?> 30===DONE=== 31--EXPECTF-- 32*** Testing gmdate() : usage variation *** 33 34-- Testing gmdate() function with partial textual representation of day -- 35string(%d) "%s" 36string(3) "Fri" 37 38-- Testing gmdate() function with full textual representation of day -- 39string(%d) "%s" 40string(6) "Friday" 41 42-- Testing gmdate() function with English ordinal suffix -- 43string(%d) "%s" 44string(2) "th" 45===DONE=== 46