1--TEST-- 2Test gmdate() function : usage variation - Passing Month 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 full textual representation of month format --\n"; 12var_dump( gmdate('F') ); 13var_dump( gmdate('F', $timestamp) ); 14 15echo "\n-- Testing gmdate() function with numeric representation of month format --\n"; 16var_dump( gmdate('m') ); 17var_dump( gmdate('m', $timestamp) ); 18 19echo "\n-- Testing gmdate() function with short textual representation of month format --\n"; 20var_dump( gmdate('M') ); 21var_dump( gmdate('M', $timestamp) ); 22 23echo "\n-- Testing gmdate() function with numeric representation of month without leading zeros format --\n"; 24var_dump( gmdate('n') ); 25var_dump( gmdate('n', $timestamp) ); 26 27echo "\n-- Testing gmdate() function with number of days in a month format --\n"; 28var_dump( gmdate('t') ); 29var_dump( gmdate('t', $timestamp) ); 30 31?> 32--EXPECTF-- 33*** Testing gmdate() : usage variation *** 34 35-- Testing gmdate() function with full textual representation of month format -- 36string(%d) "%s" 37string(6) "August" 38 39-- Testing gmdate() function with numeric representation of month format -- 40string(%d) "%d" 41string(2) "08" 42 43-- Testing gmdate() function with short textual representation of month format -- 44string(%d) "%s" 45string(3) "Aug" 46 47-- Testing gmdate() function with numeric representation of month without leading zeros format -- 48string(%d) "%d" 49string(1) "8" 50 51-- Testing gmdate() function with number of days in a month format -- 52string(%d) "%d" 53string(2) "31" 54